Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Threads problem: segfault in ntop1.1a9
@ 1999-01-04 16:15 y0000218
  1999-01-04 16:52 ` Sources for Multia SCSI hdd's Izaak Bozof
  1999-01-08 16:58 ` Threads problem: segfault in ntop1.1a9 Stefan Schroepfer
  0 siblings, 2 replies; 4+ messages in thread
From: y0000218 @ 1999-01-04 16:15 UTC (permalink / raw)


I have a problem compiling ntop-1.1a9 (ftp://ftp.unipi.it/pub/ntop/snapshots/
ntop1.1a9.tar.gz) the uses threads. it works on x86.

Just compiled ntop on a alpha-redhat-5.2 system, 2.1.130
kernel.


Starting program: /home/olaf/bin/./ntop -w 3000 -n

Program received signal SIGUSR1, User defined signal 1.
__sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42: No such file or directory.
Current language:  auto; currently asm
(gdb) bt
#0  __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
#1  0x2000027d1d0 in pthread_create (thread=0x1201884a0, attr=0x0, 
    start_routine=0x120009450 <dequeuePacket>, arg=0x0) at restart.h:32
#2  0x12000a6a0 in createThread (threadId=0x0, __start_routine=0, __arg=0x0)
    at util.c:374
#3  0x120003008 in main (argc=4, argv=0x11ffff7f8) at ntop.c:279
(gdb) l util.c:374
369
370     int createThread(pthread_t *threadId,
371                       void *(*__start_routine) (void *),
372                       void *__arg) {
373
374       int rc = pthread_create(threadId, NULL, 
375                               __start_routine, __arg);
376
377       return(rc);
378     }

after loading the initial page in a web browser.


Starting program: /tmp/olaf/ntop-1.1a9/ntop -w 3000 -n

(global vars:)


#ifdef MULTITHREADED
ConditionalVariable packetQueueCondvar;
pthread_mutex_t     packetQueueMutex;  
pthread_t           dequeueThreadId, handleWebConnectionsThreadId, updateThptThreadId;
PacketInformation packetQueue[PACKET_QUEUE_LENGTH];
unsigned int maxPacketQueueLen, packetQueueLen, packetQueueHead, packetQueueTail, packetQueueDroppedPkts;
#endif



Breakpoint 1, main (argc=4, argv=0x11ffff7f8) at ntop.c:279
279       createThread(&dequeueThreadId, dequeuePacket, NULL);
Current language:  auto; currently c
(gdb) l
274     #ifdef MULTITHREADED
275       maxPacketQueueLen = packetQueueLen = packetQueueHead = 
276         packetQueueTail = packetQueueDroppedPkts = 0;
277       createCondvar(&packetQueueCondvar);
278       createMutex(&packetQueueMutex);
279       createThread(&dequeueThreadId, dequeuePacket, NULL);
280       createThread(&updateThptThreadId, updateThptLoop, NULL);
281     #endif
282
283       (void)fprintf(stderr, "ntop v.%s "
(gdb) p dequeueThreadId
$1 = 0
(gdb) p* dequeueThreadId
Cannot access memory at address 0x0.
(gdb) p &dequeueThreadId
$2 = (pthread_t *) 0x1201884a0
(gdb) p dequeuePacket
$3 = {void ()} 0x120009450 <dequeuePacket>
(gdb) s
createThread (threadId=0x1201884a0, 
    __start_routine=0x120009450 <dequeuePacket>, __arg=0x0) at util.c:374
374       int rc = pthread_create(threadId, NULL, 
(gdb) l
369
370     int createThread(pthread_t *threadId,
371                       void *(*__start_routine) (void *),
372                       void *__arg) {
373
374       int rc = pthread_create(threadId, NULL, 
375                               __start_routine, __arg);
376
377       return(rc);
378     }
(gdb) m threadId
Ambiguous command "m threadId": maintenance, make, mt.
(gdb) p threadId
$4 = (pthread_t *) 0x1201884a0
(gdb) p __start_routine
$5 = (void *(*)()) 0x120009450 <dequeuePacket>
(gdb) p __arg
$6 = (void *) 0x0
(gdb) s
pthread_create (thread=0xbb8, attr=0x12014839c, start_routine=0x3690e794, 
    arg=0x11ffff7f8) at pthread.c:233
pthread.c:233: No such file or directory.
(gdb)  b util.c:377
Breakpoint 2 at 0x12000a6a8: file util.c, line 377.
(gdb) c
Continuing.

Program received signal SIGUSR1, User defined signal 1.
__sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42: No such file or directory.
Current language:  auto; currently asm
(gdb) bt
#0  __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
#1  0x2000027d1d0 in pthread_create (thread=0x1201884a0, attr=0x0, 
    start_routine=0x120009450 <dequeuePacket>, arg=0x0) at restart.h:32
#2  0x12000a6a0 in createThread (threadId=0x0, __start_routine=0, __arg=0x0)
    at util.c:374
#3  0x120003008 in main (argc=4, argv=0x11ffff7f8) at ntop.c:279


glibc-2.0.7-29

/lib/libpthread-0.7.so
/lib/libpthread.so.0
/usr/lib/libpthread.a
/usr/lib/libpthread.so


x86 system, rh 5.2, same versions, kernel 2.0.36:

works. 
Starting program: /tmp/olaf/ntop-1.1a9/ntop -w 3000 -n

Breakpoint 1, main (argc=4, argv=0xbffffd1c) at ntop.c:279
279       createThread(&dequeueThreadId, dequeuePacket, NULL);
(gdb) p &dequeueThreadId
$1 = (long unsigned int *) 0x80c075c
(gdb) p dequeuePacket
$2 = {void ()} 0x804df40 <dequeuePacket>
(gdb) s
createThread (threadId=0x80c075c, __start_routine=0x804df40 <dequeuePacket>, 
    __arg=0x0) at util.c:374
374       int rc = pthread_create(threadId, NULL, 
(gdb) l
369
370     int createThread(pthread_t *threadId,
371                       void *(*__start_routine) (void *),
372                       void *__arg) {
373
374       int rc = pthread_create(threadId, NULL, 
375                               __start_routine, __arg);
376
377       return(rc);
378     }
(gdb) p threadId
$3 = (long unsigned int *) 0x80c075c
(gdb) p __start_routine
$4 = (void *(*)()) 0x804df40 <dequeuePacket>
(gdb) p __arg
$5 = (void *) 0x0
(gdb) s
strcmp (p1=0x8048e85 "_IO_stdin_", p2=0x8049096 "pthread_create")
    at ../sysdeps/generic/strcmp.c:30
../sysdeps/generic/strcmp.c:30: No such file or directory.
(gdb) 
(gdb) b util.c:377
Breakpoint 2 at 0x804eae7: file util.c, line 377.
(gdb) c
Continuing.
[New Thread 19982]
[New Thread 19968]
[New Thread 19983]

Breakpoint 2, createThread (threadId=0x80c075c, 
    __start_routine=0x804df40 <dequeuePacket>, __arg=0x0) at util.c:378
378     }
(gdb) 


Any hints? 

Olaf

-- 
"The number of Unix installations       Olaf Schnapauff,
has grown to 10, with more expected."   O.Schnapauff@tu-bs.de  
- The Unix Programmer's Manual,1972     http://www.tu-bs.de/~c0033014/
       See Web page and keyservers  for pgp public key


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

* Sources for Multia SCSI hdd's
  1999-01-04 16:15 Threads problem: segfault in ntop1.1a9 y0000218
@ 1999-01-04 16:52 ` Izaak Bozof
  1999-01-04 17:51   ` Kevin.Brown
  1999-01-08 16:58 ` Threads problem: segfault in ntop1.1a9 Stefan Schroepfer
  1 sibling, 1 reply; 4+ messages in thread
From: Izaak Bozof @ 1999-01-04 16:52 UTC (permalink / raw)
  To: axp-list

I got a couple of the $59 Multias, and wanted to run with an internal hdd.

Here are two vendors with the 2.5 inch scsi hdds:

www.powerbook1.com
540mb drive for $249.

www.apstech.com
810mb and 1gb drives both for $349 each. (?)

Some Apple Powerbooks use a 2.5 inch scsi drive.


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

* Re: Sources for Multia SCSI hdd's
  1999-01-04 16:52 ` Sources for Multia SCSI hdd's Izaak Bozof
@ 1999-01-04 17:51   ` Kevin.Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin.Brown @ 1999-01-04 17:51 UTC (permalink / raw)
  To: axp-list

> www.apstech.com
> 810mb and 1gb drives both for $349 each. (?)

This is where I got my HD for the Multias.


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

* Re: Threads problem: segfault in ntop1.1a9
  1999-01-04 16:15 Threads problem: segfault in ntop1.1a9 y0000218
  1999-01-04 16:52 ` Sources for Multia SCSI hdd's Izaak Bozof
@ 1999-01-08 16:58 ` Stefan Schroepfer
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Schroepfer @ 1999-01-08 16:58 UTC (permalink / raw)
  To: axp-list

All I can say is: you are not alone having problems with threads
on Linux/Alpha. My own multithreaded code, which compiles cleanly
and runs fine on Linux/Intel and IRIX, segfaults using RedHat 5.1
with glibc-2.0.7-19 and egcs 1.1.1 (in my case I'm getting SIGSEGVs).
All threaded examples that come with glibc run fine on my box.

Stefan Schroepfer

y0000218@rzsrv2.rz.tu-bs.de wrote:
> 
> I have a problem compiling ntop-1.1a9 (ftp://ftp.unipi.it/pub/ntop/snapshots/
> ntop1.1a9.tar.gz) the uses threads. it works on x86.
> 
> Just compiled ntop on a alpha-redhat-5.2 system, 2.1.130
> kernel.
> 
> Starting program: /home/olaf/bin/./ntop -w 3000 -n
> 
> Program received signal SIGUSR1, User defined signal 1.
> __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
> ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42: No such file or directory.
> Current language:  auto; currently asm
> (gdb) bt
> #0  __sigsuspend () at ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:42
> #1  0x2000027d1d0 in pthread_create (thread=0x1201884a0, attr=0x0,
>     start_routine=0x120009450 <dequeuePacket>, arg=0x0) at restart.h:32
> #2  0x12000a6a0 in createThread (threadId=0x0, __start_routine=0, __arg=0x0)
>     at util.c:374
> [...]


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

end of thread, other threads:[~1999-01-08 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-04 16:15 Threads problem: segfault in ntop1.1a9 y0000218
1999-01-04 16:52 ` Sources for Multia SCSI hdd's Izaak Bozof
1999-01-04 17:51   ` Kevin.Brown
1999-01-08 16:58 ` Threads problem: segfault in ntop1.1a9 Stefan Schroepfer

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