http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c0
Summary: pstoedit crashes when called from inkscape Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: All OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: gerlach@mbi-berlin.de QAContact: qa@suse.de Found By: --- Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.1 Firefox/3.6.6
pstoedit crashes when converting pdf to svg (used by inkscape textext)
Reproducible: Always
Steps to Reproduce: 1. pstoedit -f plot-svg file.pdf file.svg -dt -ssp -psarg -r9600x9600 (command used by inkscape) Actual Results: pstoedit: version 3.50 / DLL interface 108 (build Jul 5 2010 - release build - g++ 4.5.0 20100604 [gcc-4_5-branch revision 160292]) : Copyright (C) 1993 - 2009 Wolfgang Glunz Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion `map->l_init_called' failed!
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c
yang xiaoyu xyyang@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xyyang@novell.com AssignedTo|bnc-team-screening@forge.pr |sbrabec@novell.com |ovo.novell.com |
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c1
Stanislav Brabec sbrabec@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pbaudis@novell.com Summary|pstoedit crashes when |pstoedit crashes in |called from inkscape |dl_close() when called from | |inkscape
--- Comment #1 from Stanislav Brabec sbrabec@novell.com 2010-07-19 18:51:28 CEST --- I am able to reproduce:
#0 _dl_close (_map=0x60a2c0) at dl-close.c:731 #1 0x00007ffff7deb606 in _dl_catch_error (objname=0x60a270, errstring=0x60a278, mallocedp=0x60a268, operate=0x7ffff70b4ff0 <dlclose_doit>, args=0x60a2c0) at dl-error.c:178 #2 0x00007ffff70b54cc in _dlerror_run (operate=0x7ffff70b4ff0 <dlclose_doit>, args=0x60a2c0) at dlerror.c:164 #3 0x00007ffff70b501f in __dlclose (handle=<value optimized out>) at dlclose.c:48 #4 0x00007ffff7b68eb1 in DynLoader::close() () from /usr/lib64/libpstoedit.so.0 #5 0x00007ffff7b68ed8 in DynLoader::~DynLoader() () from /usr/lib64/libpstoedit.so.0 #6 0x00007ffff7b69560 in PluginVector::~PluginVector() () from /usr/lib64/libpstoedit.so.0 #7 0x00007ffff750a875 in __cxa_finalize (d=0x7ffff7db3c30) at cxa_finalize.c:56 #8 0x00007ffff7b68a56 in __do_global_dtors_aux () from /usr/lib64/libpstoedit.so.0 #9 0x0000000000000000 in ?? ()
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c2
--- Comment #2 from Petr Baudis pbaudis@novell.com 2010-07-19 21:42:34 UTC --- Is this a single-threaded application? You might want to also check if dlclose() is not called twice on the same handle - LD_DEBUG (see ld.so(8)) is useful for checking this stuff.
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c3
--- Comment #3 from Stanislav Brabec sbrabec@novell.com 2010-07-20 15:50:53 CEST --- Guessing from impossibility of gdb (see below) it is a single thread application that loads multi threaded library.
For purpose of debugging, I recompiled the application with -lpthread. I am now able to debug, the error that appears is the same.
[Thread debugging using libthread_db enabled] Cannot find new threads: generic error
No, it seems not to be called twice. After adding debug messages:
Called dlopen() which returned 0x60a2c0 Called dlopen() which returned 0x60c070 Called dlopen() which returned 0x611830 Detaching after fork from child process 19576. Going to dlclose(0x60a2c0)
(Well, and handle is set to 0 after any call.)
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c4
--- Comment #4 from Stanislav Brabec sbrabec@novell.com 2010-07-20 16:58:56 CEST --- Created an attachment (id=377206) --> (http://bugzilla.novell.com/attachment.cgi?id=377206) debug log with LD_DEBUG=all
Confirming that pstoedit does not use threads but dynamically loaded /usr/lib64/pstoedit/libp2edrvmagick++.so uses threads. But linking of pstoedit with pthread and/or removing of /usr/lib64/pstoedit/libp2edrvmagick++.so does not help in working-around this bug.
The application debug point strings: "Called dlopen" and "Going to dlclose"
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c5
Stanislav Brabec sbrabec@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |ASSIGNED
--- Comment #5 from Stanislav Brabec sbrabec@novell.com 2010-07-27 17:42:12 CEST --- I just did deeper debugging.
pstoedit called dlopen("/usr/lib64/pstoedit/libp2edrvstd.so", RTLD_LAZY) as a first instance.
This dlopen() returned 0x60a2c0.
Looking inside returned opaque structure, I seen: (*(struct link_map *)0x60a2c0)->l_init_called = 1
Well, I set hardware watchpoint on this address and found a place, where it switches to 0:
Called dlopen() which returned 0x611830 Detaching after fork from child process 25273. Hardware watchpoint 8: (*(struct link_map *)0x60a2c0)->l_init_called
Old value = 1 New value = 0 _dl_fini () at dl-fini.c:224 224 if (l->l_info[DT_FINI_ARRAY] != NULL 2: (*(struct link_map *)0x60a2c0)->l_init_called = 0 (gdb) bt #0 _dl_fini () at dl-fini.c:224 #1 0x00007ffff750a4e1 in __run_exit_handlers () from /lib64/libc.so.6 #2 0x00007ffff750a535 in exit () from /lib64/libc.so.6 #3 0x00007ffff74f3b84 in __libc_start_main () from /lib64/libc.so.6 #4 0x00000000004007e9 in _start () (gdb) c Continuing. Going to dlclose(0x60a2c0)
Breakpoint 4, _dl_close (_map=0x60a2c0) at dl-close.c:725 725 { 2: (*(struct link_map *)0x60a2c0)->l_init_called = 0 (gdb) c Continuing.
Breakpoint 1, _dl_close (_map=0x60a2c0) at dl-close.c:731 731 assert (map->l_init_called); 2: (*(struct link_map *)0x60a2c0)->l_init_called = 0 (gdb) c Continuing. Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion `map->l_init_called' failed!
Program exited with code 0177.
I don't know yet why exit was called before dlclose() from DynLoader::close().
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c6
--- Comment #6 from Stanislav Brabec sbrabec@novell.com 2010-08-09 17:37:12 CEST --- Did a further debugging and here is my understanding what is happening:
Application runs and reaches the final exit.
As part of the post-exit processing, all dynamically loaded libraries are unloaded (at least partially) and l_init_called is unset.
For some reason, library destructors are called even later. They call dlclose() and the upper mentioned error happends.
So the real problems:
- Why the class destructors are called too late.
- Why changes done by exit() are not prone to later calls of dlclose().
As a quick work-around, it is possible to not call dlclose() at all.
But I think that the real bug is somewhere inside glibc or C++.
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c7
Stanislav Brabec sbrabec@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |maintenance@opensuse.org
--- Comment #7 from Stanislav Brabec sbrabec@novell.com 2010-08-09 20:03:14 CEST --- Package for testing without dlclose() will appear soon in home:sbrabec:branches:openSUSE:11.3:Update:Test (one line change) and home:sbrabec:branches:multimedia:libs (more fixes). Please test. I guess it should work without any problems.
To Maintenance team: I think that the fix/work-around should be released as online update.
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c8
Stanislav Brabec sbrabec@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sbrabec@novell.com AssignedTo|sbrabec@novell.com |pbaudis@novell.com
--- Comment #8 from Stanislav Brabec sbrabec@novell.com 2010-08-10 15:24:03 CEST --- However the fix does not address the probable real source of the problem, it seems to fix the issue completely.
Created request id 45284 for openSUSE:11.3:Update:Test and request id 45287 to openSUSE:Factory.
Reassigning to Petr Baudiš to evaluate the glibc issue (exit releasing shared library before calling dlclose() in destructors).
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c9
Christian Dengler cdengler@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cdengler@novell.com
--- Comment #9 from Christian Dengler cdengler@novell.com 2010-08-11 15:39:20 UTC --- I think we can update pstoedit (+1)
If the glibc update is resolved we can pick it up with the next glibc update.
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c10
--- Comment #10 from Stanislav Brabec sbrabec@novell.com 2010-08-12 20:55:11 CEST --- No, the glibc fix is not yet resolved. IMHO the fix in pstoedit is just a work-around, but it should have no side effect.
As the bug makes impossible to open PDF files in inkscape, I think we should update psedit.
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c11
--- Comment #11 from Stanislav Brabec sbrabec@novell.com 2010-08-16 15:20:23 CEST --- To maintenance: Could you provide a SWAMP, please?
Note that Redhat is also affected: https://bugzilla.redhat.com/show_bug.cgi?id=507035
http://bugzilla.novell.com/show_bug.cgi?id=622977
http://bugzilla.novell.com/show_bug.cgi?id=622977#c12
--- Comment #12 from Marcus Meissner meissner@novell.com 2010-08-16 13:30:10 UTC --- sounds like a good idea to do an update +1
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c13
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:running:35209:low
--- Comment #13 from Swamp Workflow Management swamp@suse.com 2010-08-17 12:07:31 UTC --- The SWAMPID for this issue is 35209. This issue was rated as low. Please submit fixed packages until 2010-09-14. Also create a patchinfo file using this link: https://swamp.suse.de/webswamp/wf/35209
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c14
Christian Dengler cdengler@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|maintenance@opensuse.org |
--- Comment #14 from Christian Dengler cdengler@novell.com 2010-08-17 12:08:06 UTC --- So update started. Be so kind and submit a patchinfo and the fixed sources.
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c16
--- Comment #16 from Stanislav Brabec sbrabec@novell.com 2010-08-23 18:45:23 CEST --- Reporting to the upstream Bugzilla: http://sources.redhat.com/bugzilla/show_bug.cgi?id=11941
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c17
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:35209:low |maint:running:35209:low | |maint:released:11.3:35215
--- Comment #17 from Swamp Workflow Management swamp@suse.com 2010-08-25 10:01:19 UTC --- Update released for: pstoedit, pstoedit-debuginfo, pstoedit-debugsource, pstoedit-devel Products: openSUSE 11.3 (debug, i586, x86_64)
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:35209:low |maint:released:11.3:35215 |maint:released:11.3:35215 |
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c18
Petr Baudis pbaudis@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |DUPLICATE
--- Comment #18 from Petr Baudis pbaudis@novell.com 2010-10-27 02:26:03 UTC --- I will mark this as a dupe of bug 645652. This bug has been first, but the latter is more conscise and to-the-point since it starts with the ld.so issue right away and is purely about glibc, so it should be easier to work within that one.
*** This bug has been marked as a duplicate of bug 645652 *** http://bugzilla.novell.com/show_bug.cgi?id=645652
https://bugzilla.novell.com/show_bug.cgi?id=622977
https://bugzilla.novell.com/show_bug.cgi?id=622977#c19
Stanislav Brabec sbrabec@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madworm_de.novell@spitzenpf | |eil.org
--- Comment #19 from Stanislav Brabec sbrabec@novell.com 2011-03-22 18:55:58 CET --- *** Bug 555599 has been marked as a duplicate of this bug. *** http://bugzilla.novell.com/show_bug.cgi?id=555599
http://bugzilla.novell.com/show_bug.cgi?id=622977 http://bugzilla.novell.com/show_bug.cgi?id=622977#c20
--- Comment #20 from Bernhard Wiedemann bwiedemann@suse.com --- This is an autogenerated message for OBS integration: This bug (622977) was mentioned in https://build.opensuse.org/request/show/45284 11.3:Test / pstoedit https://build.opensuse.org/request/show/45287 Factory / pstoedit
http://bugzilla.novell.com/show_bug.cgi?id=622977
Johnny Willemsen jwillemsen@remedy.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jwillemsen@remedy.nl