Bug 175573 - yast2 PPD::cleanupLists memory corruption
Summary: yast2 PPD::cleanupLists memory corruption
Status: RESOLVED DUPLICATE of bug 214265
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: x86-64 SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: ---
Assignee: Michal Zugec
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-13 20:57 UTC by Forgotten User kAgYoS08kd
Modified: 2006-10-24 15:11 UTC (History)
1 user (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
/var/log/YaST2/* (508.53 KB, application/x-bzip2)
2006-05-25 12:30 UTC, Forgotten User kAgYoS08kd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User kAgYoS08kd 2006-05-13 20:57:30 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
Comment 1 Michael Gross 2006-05-15 14:58:38 UTC
Please don't only attach a backtrace but describe the problem, specially how it can be reproduced.
Comment 2 Forgotten User kAgYoS08kd 2006-05-15 16:43:37 UTC
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.
Comment 3 Michael Gross 2006-05-15 16:57:12 UTC
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.
Comment 4 Michael Gross 2006-05-22 14:02:45 UTC
Please reopen this report if you can provide the required information.
Comment 5 Forgotten User kAgYoS08kd 2006-05-25 12:28:07 UTC
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)
Comment 6 Forgotten User kAgYoS08kd 2006-05-25 12:30:48 UTC
Created attachment 85086 [details]
/var/log/YaST2/*

Attached /var/log/YaST2 as tarball.
Comment 7 Michael Gross 2006-05-26 10:19:15 UTC
Michal, please have a look.
Comment 8 Michal Zugec 2006-05-26 11:23:31 UTC
I can't see anything bad.
No y2error (with code <3>)
cat y2log|cut -d' ' -f3|sort -u
Comment 9 Michal Zugec 2006-05-26 11:32:02 UTC
This is proabably cups problem.
Klaus?
Comment 10 Klaus Singvogel 2006-05-29 08:56:15 UTC
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.
Comment 11 Michal Zugec 2006-10-24 15:11:07 UTC
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 ***