Bug 150742

Summary: gdb randomly loses track of a variable
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: cagney, jjohnstn, rvokal, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-28 04:55:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150221    

Description Bill Nottingham 2005-03-10 03:38:44 UTC
Debugging cupsd.

Starting program: /tmp/cupsd -f
Breakpoint 2 at 0x7adae9: file main.c, line 274.
Breakpoint 3 at 0x7c486d: file printers.c, line 86.

Breakpoint 2, main (argc=2, argv=0xbfe08ae4) at main.c:274
274       for (i = 1; i < argc; i ++)
(gdb) cont
Continuing.

Breakpoint 3, AddPrinter (name=0xbfe03d8c "stylus") at printers.c:86
86        LogMessage(L_DEBUG2, "AddPrinter(\"%s\")", name ? name :
"(null)");
(gdb) display name
2: name = 0xbfe03d8c "stylus"
(gdb) next
88        if (name == NULL)
2: name = Variable "name" is not available.
Disabling display 2 to avoid infinite recursion.
(gdb) p name
Variable "name" is not available.
(gdb) i addr name
Symbol "name" is a variable with multiple locations.
(gdb)

Comment 2 Jon Stanley 2008-03-28 01:45:58 UTC
Adding Tracking keyword

Comment 3 Jan Kratochvil 2008-03-28 04:55:07 UTC
Jon, this is not a Tracking Bug, this is a real defect bugreport.

(In reply to comment #0)
> (gdb) next
> 88        if (name == NULL)
> 2: name = Variable "name" is not available.
> Disabling display 2 to avoid infinite recursion.

Not reproducible on F8:
  gdb-6.6-45.fc8.x86_64
  cups-1.3.6-2.fc8.x86_64

Breakpoint 1, cupsdAddPrinter (name=0x7fff6311fde0 "postscript") at printers.c:90
90      {
(gdb) display name
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
90      {
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
90      {
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
98        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddPrinter(\"%s\")", name);
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
104       if ((p = calloc(1, sizeof(cupsd_printer_t))) == NULL)
1: name = 0x7fff6311fde0 "postscript"
(gdb) next
111       cupsdSetString(&p->name, name);
1: name = 0x7fff6311fde0 "postscript"


Still this minor problem is present (even in Rawhide + upstream HEAD):
(gdb) i addr name
Symbol "name" is a variable with multiple locations.