Bugzilla – Bug 175573
yast2 PPD::cleanupLists memory corruption
Last modified: 2006-10-24 15:11:07 UTC
> rpm -qa|sort|grep -e printer -e libstdc++ compat-libstdc++-5.0.7-6 libstdc++-4.0.2_20050901-3 libstdc++-devel-4.0.2_20050901-3 yast2-printer-2.12.6-2 yast2-printer-debuginfo-2.12.6-2 >gdb /usr/lib/YaST2/bin/y2base (gdb) run --logfile y2base.log printer ncurses printer ncurses Starting program: /usr/lib/YaST2/bin/y2base --logfile y2base.log printer ncurses printer ncurses [Thread debugging using libthread_db enabled] [New Thread 46912533697952 (LWP 18753)] [New Thread 1077942624 (LWP 18834)] *** glibc detected *** malloc(): memory corruption: 0x000000000174a002 *** Program received signal SIGABRT, Aborted. [Switching to Thread 1077942624 (LWP 18834)] 0x00002aaaacc8243a in raise () from /lib64/tls/libc.so.6 (gdb) bt #0 0x00002aaaacc8243a in raise () from /lib64/tls/libc.so.6 #1 0x00002aaaacc83870 in abort () from /lib64/tls/libc.so.6 #2 0x00002aaaaccb806e in __libc_message () from /lib64/tls/libc.so.6 #3 0x00002aaaaccbd40c in malloc_printerr () from /lib64/tls/libc.so.6 #4 0x00002aaaaccbe47b in _int_malloc () from /lib64/tls/libc.so.6 #5 0x00002aaaaccbfb04 in malloc () from /lib64/tls/libc.so.6 #6 0x00002aaaac8abca8 in operator new () from /usr/lib64/libstdc++.so.6 #7 0x00002aaaac88a8ed in std::string::_Rep::_S_create () from /usr/lib64/libstdc++.so.6 #8 0x00002aaaac88a98b in std::string::_Rep::_M_clone () from /usr/lib64/libstdc++.so.6 #9 0x00002aaaac88ab1c in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib64/libstdc++.so.6 #10 0x00002aaaaf9fe204 in PPD::cleanupLists (this=0x1209ea0) at PPDdb.h:62 #11 0x00002aaaafa06da2 in PPD::createdbThread (this=0x1209ea0, filename=0x0) at PPDdb.cc:450 #12 0x00002aaaabca9fa5 in start_thread () from /lib64/tls/libpthread.so.0 #13 0x00002aaaacd10cb2 in clone () from /lib64/tls/libc.so.6 #14 0x0000000000000000 in ?? () ... End of y2base.log: 2006-05-02 10:12:45 <1> xxx(18753) [YCP] Printerdb.ycp:318 Checking foomatic database 2006-05-02 10:12:45 <1> xxx(18753) [YCP] Printerdb.ycp:321 Database changed 2006-05-02 10:12:45 <1> xxx(18753) [agent-ppd] PPDdb.cc(createdbThread):419 CreateDbThread started 2006-05-02 10:12:46 <1> xxx(18753) [agent-ppd] PPDdb.cc(loadPrebuiltDatabase):1439 Database file parsed correctly by YCP parser 2006-05-02 10:12:46 <1> xxx(18753) [agent-ppd] PPDdb.cc(loadPrebuiltDatabase):1670 Database contents is OK
Please don't only attach a backtrace but describe the problem, specially how it can be reproduced.
How to reproduce: Open some command line, eg. xterm. Enter the invokation shown on line 8 in the first description by typing in the characters excluding the first >, or copy and paste it. You might need to press Enter. Now (gdb) appears. There enter the invokation shown on line 9 in the first description the same way. If you are not root, you need to enter the root password. Now the memory corruption takes place. Remark: "printer ncurses printer ncurses" is not needed, a single "printer ncurses" also does the memory corruption.
Please attach /var/log/YaST2 as tarball. Does YaST only crash when using the ncurses interface? Does it only crash when calling the priniter module? Have you configured any printers? What does `hwinfo --printer' say? That's what I ment by reproducing, I can see that you called the module, however if this would not work in general, you can impress that it would've been fixed a long time ago. For YaST related bugs, we always need the ylogs, a backtrace is normally not required as YaST's logging is quite verbosive.
Please reopen this report if you can provide the required information.
YaST only crashes when calling the printer module. The printer module cashes in both ncurses and QT interface. It crashed the first time the printer module was invoked after installation of SuSE Linux 10.0, when no printer had been configured. It even crashes when I remove both parallel ports (disabling on-board parallel port and removing PCI parallel port card, and removing the cables to the printer). `hwinfo --printer' says nothing when all printers are removed, and says the following if they are connected: 13: Parallel 00.0: 10900 Printer [Created at parallel.154] Unique ID: ffnC.j2fGfujUQ30 Parent ID: YMnp.ecK7NLYWZ5D Hardware Class: printer Model: "Hewlett-Packard HP LaserJet 5L" Vendor: "Hewlett-Packard" Device: "HP LaserJet 5L" Device File: /dev/lp0 Config Status: cfg=no, avail=yes, need=no, active=unknown Attached to: #9 (Parallel controller) 15: Parallel 00.0: 10900 Printer [Created at parallel.154] Unique ID: 6r1H.LzKKbu1WGa8 Parent ID: +X1u.ecK7NLYWZ5D Hardware Class: printer Model: "HEWLETT-PACKARD PSC 500" Vendor: "HEWLETT-PACKARD" Device: "PSC 500" Device File: /dev/lp1 Config Status: cfg=no, avail=yes, need=no, active=unknown Attached to: #14 (Parallel controller)
Created attachment 85086 [details] /var/log/YaST2/* Attached /var/log/YaST2 as tarball.
Michal, please have a look.
I can't see anything bad. No y2error (with code <3>) cat y2log|cut -d' ' -f3|sort -u
This is proabably cups problem. Klaus?
Michal: Sorry, but no, I don't think it's a cups problem. No cups library call is involved in above trace. It's within in YaST2.
It's similar to #214265 remove /var/lib/YaST2/ppd_db.ycp a start yast2 printer will rebuild that database *** This bug has been marked as a duplicate of bug 214265 ***