Some more details. This is the latest output from "strace" as running against 
an existing gnucash process, just before hitting the "File->Quit" option:
"""
[pid 13334] 17:18:16 open("/home/username/.gnucash/expressions-2.0", 
O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
[pid 13334] 17:18:16 write(14, "", 0)   = 0
[pid 13334] 17:18:16 close(14)          = 0
[pid 13334] 17:18:16 open("/home/username/.gnucash/stylesheets-2.0", 
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 14
[pid 13334] 17:18:16 fcntl64(14, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE)
[pid 13334] 17:18:16 _llseek(14, 0, [0], SEEK_CUR) = 0
[pid 13334] 17:18:16 fstat64(14, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
[pid 13334] 17:18:16 write(14, "(let ((template 
(gnc:html-style-sheet-template-find \"Plain\")))\n  (if template \n    (let 
((options ((gnc:html-style-sheet-template-options-generator template)))) \n\n; 
Section: Tables\n\n\n; Section: General\n\n\n; Section: Fonts\n\n(let ((option 
(gnc:lookup-option options\n                                 \"Fonts\"\n        
                         \"Text cell\")))\n  ((lambda (option) (if option 
((gnc:option-setter option) \"Ubuntu 9\"))) option))\n\n(let ((option 
(gnc:lookup-option options\n                                 \"Fonts\"\n        
                         \"Number header\")))\n  ((lambda (option) (if option 
((gnc:option-setter option) \"Ubuntu 9\"))) option))\n\n(let ((option 
(gnc:lookup-option options\n                                 \"Fonts\"\n        
                         \"Account link\")))\n  ((lambda (option) (if option 
((gnc:option-setter option) \"Ubuntu Italic 9\"))) option))\n\n(let ((option 
(gnc:lookup-option options\n  
                                \"Fonts\"\n                                 
\"Number cell\")))\n  ((lambda (optio"..., 3954) = 3954
[pid 13334] 17:18:16 close(14)          = 0
[pid 13334] 17:18:16 close(3)           = 0
[pid 13334] 17:18:16 munmap(0xb7430000, 4096) = 0
[pid 13334] 17:18:16 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, 
si_addr=0x9aa0740} ---
[pid 13336] 17:18:16 <... poll resumed> ) = ? <unavailable>
[pid 13348] 17:18:47 +++ killed by SIGSEGV (core dumped) +++
[pid 13336] 17:18:47 +++ killed by SIGSEGV (core dumped) +++
[pid 13335] 17:18:47 +++ killed by SIGSEGV (core dumped) +++
17:18:47 +++ killed by SIGSEGV (core dumped) +++
"""

FD number 3 happened to be:
"""
COMMAND   PID     USER   FD   TYPE     DEVICE SIZE/OFF    NODE NAME
gnucash 13334 username    3u   REG        8,3      176 2490542 
/tmp/gnucash.trace
"""
And the referred file contents were as follows after the crash on shutdown:
"""
$ cat /tmp/gnucash.trace
* 17:12:12  WARN <gnc.backend.dbi> [gnc_module_init_backend_dbi()] No DBD 
drivers found
* 17:12:33  WARN <gnc.backend.dbi> [gnc_module_init_backend_dbi()] No DBD 
drivers found
"""

That seems to match quite well the crash on dbi_shutdown_r reported
earlier on, so despite only logging a WARNING, the root cause for the
crash on shutdown may lay there.

So I took one additional step: trying to provide gnucash with some valid libDBI 
implementation for DB backends. Prior to that, I only had the following 
installed regarding DBI:
"""
$ dpkg --get-selections | grep dbi
libdbi-perl                                     install
libdbi1:i386                                    install
"""

And then I just installed the following:
"""
$ sudo apt-get install libdbd-mysql
"""

After doing so, I can now happily start and quit gnucash with no further
crashes, SIGSEGVs or any other woes of the same kind.

So recapping what's on this Bug, it looks like gnucash as shipped by Ubuntu 
14.10 needs the following two additional packages to work fine and not crash at 
all:
"""
- python-gnucash: helps with avoiding gnucash to barf errors on startup, but 
causes gnucash to crash when quitting
- libdbd-mysql (or probably any other SQL-related DBI library): on top of the 
above, it makes gnucash avoid a SIGSEGV on "dbi_shutdown_r" on shutdown, and 
therefore quit cleanly


Hope this helps others and the package maintainer as well.

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

Title:
  gnucash crashed with ImportError in /usr/share/gnucash/python/init.py:
  No module named gnucash

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnucash/+bug/1369273/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to