SCIRun User Mailing List

Text archives Help


[SCIRUN-USERS] pthreads and SCIRun objects (from Simon smyau@nyu)


Chronological Thread 
  • From: "J. Davison de St. Germain" <dav@sci.utah.edu>
  • To: scirun-users@sci.utah.edu
  • Subject: [SCIRUN-USERS] pthreads and SCIRun objects (from Simon smyau@nyu)
  • Date: Tue, 13 Jun 2006 14:23:09 -0600

[Note: The following message is from smyau@access2.cims.nyu.edu.
Simon, please send email to the SCIRun-Users mailing list from the
account you registered to receive mail at.  SCIRun-Users automatically
rejects email from non-list members... hence the reason I needed to
forward this message on.]


Dear all,

I am new to developing scirun modules, and I am trying to write a SCIRun
module around a package that uses pthreads. I discovered that we cannot
create SCIRun objects (DenseMatrix, etc) within these newly spawned
pthreads, as they will segfault with a null pointer (I've attached the
stack trace at the end).

I've been looking through the documentation but couldn't find references
to pthreads compatibility with SCIRun. I'm wondering if that means we
can
only create SCIRun object from within SCIRun threads? Or are there ways
to
work around this problem?

Any help is appreciated,

Thank you.

- Simon

P.S., Stack trace of the seg fault:

Thread "idle or main"(pid 3759) caught signal SIGSEGV at address (nil)
(segmentation violation)
Backtrace:
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Thread.so(_ZN6SCIRun6Thread9niceAbortEPv+0x18)
[0x401ce2ec]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/libCore_Thread.so
[0x401d32fc]
/lib/tls/libpthread.so.0 [0x400758f8]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Thread.so(_ZN6SCIRun13AtomicCounterppEi+0x13)
[0x401d18ff]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Datatypes.so(_ZN6SCIRun8Datatype22compute_new_generationEv+0x1f)
[0x413f88f7]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Datatypes.so(_ZN6SCIRun8DatatypeC2Ev+0x2f)
[0x413f899b]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Datatypes.so(_ZN6SCIRun15PropertyManagerC2Ev+0x12)
[0x41419912]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libCore_Datatypes.so(_ZN6SCIRun11DenseMatrixC1Eii+0x11)
[0x413fe329]
/home/smyau/srcs/scirun2/SCIRun/linux32debug/lib/
libPackages_SimonTest_Dataflow_Modules_DataIO.so(_ZN9SimonTest23g_TestMo
duleAThreadFuncEPv+0x60)
[0x437428b8]
/lib/tls/libpthread.so.0 [0x40070484]
/lib/tls/libc.so.6(__clone+0x57) [0x420df147]
   1105658272: main (state = blocking on semaphore, main wait)
   1074133808: internal service manager (detached, state = blocking,
connection_list_condition_variable)
   1114450736: TCL main event loop (detached, state = running)
   1135196976: Scheduler (daemon, detached, state = blocking,
NetworkEditor
request FIFO, Mailbox empty condition)
   1135332144: TestModuleA (state = running)

Abort signalled by pid: 3759
With NULL thread pointer.
resume(r)/dbx(d)/cvd(c)/kill thread(k)/exit(e)? e

===========================================================================
== The SCIRun Users mailing list: send email to majordomo@sci.utah.edu   ==
== for more details.                                                     ==
== Please acknowledge use of SCIRun in your papers and reports:          ==
==   see http://software.sci.utah.edu/scirun-biopse_citation.bib         ==
===========================================================================





Archive powered by MHonArc 2.6.16.

Top of page