The attached patch adds test cases to check for this case, along with a
simpler similar test case for a file missing the ".conf" extension
(which is tested elsewhere, but always worth checking again).

This shows that the failure is an assertion:

test:job_class.c:153: Assertion failed in job_class_new: strlen (name) >
0


The backtrace in the inotify case is:

#2  0x0000000000421e92 in job_class_new (parent=0x0, name=0x6494d0 "")
    at job_class.c:153
#3  0x000000000042d029 in parse_job (parent=0x0, name=0x6494d0 "", 
    file=0x647390 "exec echo\nd", len=10, pos=0x7fffffff6ad8, 
    lineno=0x7fffffff6ad0) at parse_job.c:297
#4  0x0000000000433e2b in conf_reload_path (source=0x6470d0, 
    path=0x647460 
"/tmp/test_conf.c-test_source_reload_job_dir-1053-11500/.conf") at conf.c:747
#5  0x00000000004337d3 in conf_create_modify_handler (source=0x6470d0, 
    watch=0x648800, 
    path=0x647460 
"/tmp/test_conf.c-test_source_reload_job_dir-1053-11500/.conf", 
statbuf=0x7fffffff6bb0) at conf.c:563

And likewise in the non-inotify case there is a similar backtrace:


#2  0x000000000042123a in job_class_new (parent=0x0, name=0x6466f0 "")
    at job_class.c:153
#3  0x000000000042c3d1 in parse_job (parent=0x0, name=0x6466f0 "", 
    file=0x6476a0 "exec echo\nd", len=10, pos=0x7fffffff6ad8, 
    lineno=0x7fffffff6ad0) at parse_job.c:297
#4  0x00000000004331d3 in conf_reload_path (source=0x6460d0, 
    path=0x6473a0 
"/tmp/test_conf.c-test_source_reload_job_dir-1585-11614/.conf") at conf.c:747
#5  0x0000000000432e90 in conf_file_visitor (source=0x6460d0, 
    dirname=0x646180 "/tmp/test_conf.c-test_source_reload_job_dir-1585-11614", 
    path=0x6473a0 
"/tmp/test_conf.c-test_source_reload_job_dir-1585-11614/.conf", 
statbuf=0x7fffffff6ba0) at conf.c:647
#6  0x00007ffff7bd17b1 in ?? () from //lib/libnih.so.1
#7  0x00007ffff7bd1aef in nih_dir_walk () from //lib/libnih.so.1
#8  0x00000000004327d2 in conf_source_reload_dir (source=0x6460d0)
    at conf.c:439
#9  0x000000000043229c in conf_source_reload (source=0x6460d0) at conf.c:282


** Patch added: "conf-file-test-cases.patch"
   
https://bugs.launchpad.net/upstart/+bug/720573/+attachment/1856789/+files/conf-file-test-cases.patch

** Changed in: upstart
       Status: Confirmed => Triaged

** Changed in: upstart
   Importance: Undecided => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/720573

Title:
  Segmentation fault on ".conf" file in /etc/init

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to