GDB vs Solaris 2.4

2007-12-25 9:14:00

Hi again - summary time!

Original problem: gdb would poop out when trying to run a program, usually

with the message "/proc/xxxx: cannot open proc file" or "/proc/xxxx:

Resource temporarily unavailable". Defunct processes would indeed be

spawned, but the debugger stubornly refused to do anything else

worthwhile. Although things worked fine on a SS5, this behaviour was

observed on a SS4 and a SS10, all running Solaris 2.4. Su'ing to root

caused the problem to go away, but this is certainly not a great

alternative. :^)

Well, the problem is solved and many thanks go out to:

  Ric Anderson (ric@rtd.com)

  Martin Huber (hu@garfield.m.eunet.de)

  Tony Jago (tony@fit.qut.edu.au)

  Matthew Stier (matthew.stier@imonics.com)

Tony hit the nail on the head here: gdb must have read permission for

itself, the executable being debugged, *AND THE SHELL*. It's the shell

part that got me - I use bash, which seems to install itself with mode

751. A quick change to 755 and all is well! I'm not sure of the

ramifications of this - but I will point out that /bin/sh and /bin/csh

both are world readable. Thus, I don't think the solution should open any

security holes or the like. If somebody would care to expound on this, I'm

all ears...

Other suggestions included the need to have the SHELL environment variable

set (AFAIK, bash does this automagically) and that set[ug]id programs

sometimes cause this behaviour.

Everybody involved had great suggestions - your help is very much

appreciated. Thanks a bunch!

JLB


--
Jody L. Baze Blue Sky Tours, Inc.
Software Development 10832 Prospect Avenue N.E.
System Administration Albuquerque, NM 87112
jody@BlueSkyTours.COM (505) 292-6961

Comments

Got something to say?

You must be logged in to post a comment.