From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce982d32ff23ff56,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-16 10:52:37 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!news!not-for-mail Message-ID: <3A8D76F3.F630E908@freesurf.ch> From: Marc Mongenet X-Mailer: Mozilla 4.61 [en] (WinNT; U) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [GNAT Linux] Strange read()/write() behavior on sockets References: <3A800AEB.9704C394@freesurf.ch> <863ddrfw4o.fsf@acm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 16 Feb 2001 18:52:36 GMT NNTP-Posting-Host: 193.72.145.94 X-Trace: news 982349556 193.72.145.94 (Fri, 16 Feb 2001 19:52:36 MET) NNTP-Posting-Date: Fri, 16 Feb 2001 19:52:36 MET Organization: EUnet AG, Switzerland. A KPNQwest Company. Xref: supernews.google.com comp.lang.ada:5308 Date: 2001-02-16T18:52:36+00:00 List-Id: 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 , 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
, 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