Re: libpthread shared library version number



On Thu, 2 Nov 2006, Dan Nelson wrote:

In the last episode (Nov 02), Wesley Morgan said:
I swapped a few e-mails with Maxime Henrion, but the gist of things
was that after enabling symbol versioning, I immediately rebuilt
everything -- world, ports, kernel. The random crashes I experienced
were most apparent with two applications, csup and games/uqm from
ports. Xorg would also crash every now and then... An example of what
gdb showed me is:

Updating collection ports-all/cvs
Checkout ports/devel/ccrtp/Makefile
Error set: No such file or directory
Updater failed: Cannot create directories leading to
"/usr/ports/devel/ccrtp/Makefile": Unknown error: 0

Breakpoint 1, mkdirhier (path=0x8c40180 "/usr/ports/devel/ccrtp",
mask=18) at misc.c:293
293 errno = 0;
(gdb) n
294 if (access(path, F_OK) == 0) {
(gdb)
298 perror("Error set");
(gdb)
Error set: No such file or directory
299 if (errno != ENOENT) {
(gdb)
300 path[i] = '/';
(gdb) print errno
$1 = 0
(gdb)

It seems that errno is being changed somewhere else?? I'm getting all
kinds of wild results checking errno during execution in gdb.
Sometimes it claims to be 2 or 22, sometimes 0. I'll have to build a
UP kernel and see if that fixes the problem. Trying to use libthr
instead of libpthread dies strangely in thr_getscheduler(). Ugh.

That sort of looks like the perror() call zeroed out errno, which it
may do, since it calls a bunch of stdio functions. Try saving errno in
another variable before calling perror.

I tried several things in misc.c:mkdirhier() at the time, such as resetting the value of errno just prior to the call to access(), artificially setting it, and I'm somewhat sure I tried that saving it at the time, without success. I can't be completely sure because I simply switched back to cvsup after a few hours of fiddling, before ultimately reverting back to non-versioned libraries.


--
This .signature sanitized for your protection
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: errno/strerror() Observations
    ... something resets the errno ... ... Hardware watchpoints to the rescue. ... gdb stop when that value changes. ...
    (comp.os.linux.development.apps)
  • Re: libpthread shared library version number
    ... everything -- world, ports, kernel. ... gdb showed me is: ... It seems that errno is being changed somewhere else?? ... UP kernel and see if that fixes the problem. ...
    (freebsd-current)
  • Re: Header files with enums instead of defines?
    ... : M. Warner Losh wrote: ... :> In order to gain the benefits of the enums, errno would need to be an ... :> since you can't assign integers to errno values. ... but rather the type was used as a cast for gdb. ...
    (freebsd-arch)
  • Re: Header files with enums instead of defines?
    ... M. Warner Losh wrote: ... > In order to gain the benefits of the enums, errno would need to be an ... > since you can't assign integers to errno values. ... but rather the type was used as a cast for gdb. ...
    (freebsd-arch)
  • [2.6 patch] move frv docs one level up
    ... A summary of the configuration options particular to this architecture. ... A description of how to boot the kernel image and a summary of the kernel ... An example .gdbinit file for use with GDB. ... A description of the CPU clock scaling interface. ...
    (Linux-Kernel)