comp.lang.ada
 help / color / mirror / Atom feed
* Re: [GNAT Linux] Strange read()/write() behavior on sockets
       [not found] ` <863ddrfw4o.fsf@acm.org>
@ 2001-02-16 18:52   ` Marc Mongenet
  2001-02-23  9:32     ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Mongenet @ 2001-02-16 18:52 UTC (permalink / raw)


Laurent Guerby wrote:
> 
> You should see adainclude and adalib pathes, like:
> 
> /some/where/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/
> 
> The cd into it, and do a "ls -l", you should see that the adainclude
> and adalib are symbolic links to rts-fsu/adainclude and
> rts-fsu/adalib. Changes these to link to rts-native/adainclude and to
> rts-native/adalib. Clean all your objects and rebuild.

Thanks a lot, I made exactly what you wrote.

> Now you should get what you expect.

Well, now another strange problem happens.
The process suspend before arriving in main (yes even before the "C" main).
Maybe you also have experience of this kind of problems ?


GDB OUTPUT (after I send a SIGINT to the process)
---------------------------------------------------------------------------------------------------------

(gdb) bt
#0  0x4006c58b in __sigsuspend (set=0xbffff750) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48
#1  0x82f484b in __pthread_mutex_lock ()
#2  0x4006eaac in __new_exitfn () at atexit.c:51
#3  0x4006ea55 in __on_exit (func=0x82f3220 <pthread_exit_process>, arg=0x0) at on_exit.c:26
#4  0x82f2dc0 in __pthread_initialize ()
#5  0x400a5e94 in ptmalloc_init () at malloc.c:1672
#6  0x400a983d in malloc_hook_ini (sz=392, caller=0x4006eb04) at malloc.c:1724
#7  0x400a6366 in __libc_malloc (bytes=392) at malloc.c:2630
#8  0x4006eb04 in __new_exitfn () at atexit.c:70
#9  0x4006eb81 in atexit (func=0x4000a610 <_dl_fini>) at atexit.c:28
#10 0x40066138 in __libc_start_main (main=0x804cb9c <main>, argc=1, argv=0xbffff9e4, init=0x804bb58 <_init>, fini=0x82f7384 <_fini>, 
    rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffff9dc) at ../sysdeps/generic/libc-start.c:64


STRACE OUTPUT
---------------------------------------------------------------------------------------------------------

~/CVSwork/easyfile/ada/build $ strace ./os_subprocesses_test_parent 
execve("./os_subprocesses_test_parent", ["./os_subprocesses_test_parent"], [/* 33 vars */]) = 0
brk(0)                                  = 0x83447e8
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17470, ...}) = 0
mmap(0, 17470, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40013000
close(3)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=372604, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2408\0"..., 4096) = 4096
mmap(0, 86440, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40018000
mprotect(0x4002a000, 12712, PROT_NONE)  = 0
mmap(0x4002a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0x4002a000
mmap(0x4002b000, 8616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002b000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=540120, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320=\0"..., 4096) = 4096
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4002e000
mmap(0, 114648, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002f000
mprotect(0x4004a000, 4056, PROT_NONE)   = 0
mmap(0x4004a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1a000) = 0x4004a000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=74663, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\31\0\000"..., 4096) = 4096
mmap(0, 11532, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004b000
mprotect(0x4004d000, 3340, PROT_NONE)   = 0
mmap(0x4004d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x4004d000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=4118299, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\202"..., 4096) = 4096
mmap(0, 993500, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004e000
mprotect(0x40139000, 30940, PROT_NONE)  = 0
mmap(0x40139000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xea000) = 0x40139000
mmap(0x4013d000, 14556, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013d000
close(3)                                = 0
mprotect(0x4004e000, 962560, PROT_READ|PROT_WRITE) = 0
mprotect(0x4004e000, 962560, PROT_READ|PROT_EXEC) = 0
munmap(0x40013000, 17470)               = 0
personality(0 /* PER_??? */)            = 0
getpid()                                = 2960
getpid()                                = 2960
rt_sigaction(SIGUSR1, {0x82f3300, [], SA_RESTART|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {0x82f3390, [], 0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [USR1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [USR1], 8) = 0
rt_sigsuspend([]



Thanks again for your help.

-- 
Marc Mongenet
A camel is a horse designed by a committee. <-- Larry Wall



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GNAT Linux] Strange read()/write() behavior on sockets
  2001-02-16 18:52   ` [GNAT Linux] Strange read()/write() behavior on sockets Marc Mongenet
@ 2001-02-23  9:32     ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2001-02-23  9:32 UTC (permalink / raw)


Marc Mongenet <marc.mongenet@freesurf.ch> writes:

> The process suspend before arriving in main (yes even before the "C"
> main).

I've seen this, too but only in the debugger.  Unfortunately, GDB
changes the behavior of programs using tasking quite drastically.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-23  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3A800AEB.9704C394@freesurf.ch>
     [not found] ` <863ddrfw4o.fsf@acm.org>
2001-02-16 18:52   ` [GNAT Linux] Strange read()/write() behavior on sockets Marc Mongenet
2001-02-23  9:32     ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox