- **Type**: defect --> enhancement


---

** [tickets:#268] MsgGet doesnot get unblocked on one thread when MsgCancel is 
invoked during multithread application**

**Status:** unassigned
**Milestone:** future
**Created:** Thu May 16, 2013 11:02 AM UTC by Sirisha Alla
**Last Updated:** Thu May 16, 2013 11:02 AM UTC
**Owner:** nobody

The issue is seen on changeset 4241.

A message queue is opened. 9 threads are created and MsgGet is invoked in all 
the 9 threads. MsgGet blocks till the message is received. Now MsgCancel is 
done from the main thread. All the msgGet() unblocks except one. This issue is 
reproducible with the attached code.

Following is the bt of the application when it is blocked:

[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff7db6b00 (LWP 24893)]
[New Thread 0x7ffff7d96b00 (LWP 24894)]

[New Thread 0x7ffff7d77700 (LWP 24895)]
[New Thread 0x7ffff7576700 (LWP 24896)]
[New Thread 0x7fffeffff700 (LWP 24897)]
[New Thread 0x7ffff6d75700 (LWP 24898)]
[New Thread 0x7ffff6574700 (LWP 24899)]
[New Thread 0x7ffff5d73700 (LWP 24900)]
[New Thread 0x7ffff5572700 (LWP 24901)]
[New Thread 0x7ffff4d71700 (LWP 24902)]
[New Thread 0x7fffef7fe700 (LWP 24903)]
Attempt 1: waiting for get threads to block for message.
saMsgMessageCancel Successfull.
Waiting for all the threads to join
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
saMsgMessageGet Unblocked.
[Thread 0x7ffff7d77700 (LWP 24895) exited]
[Thread 0x7ffff4d71700 (LWP 24902) exited]
[Thread 0x7fffeffff700 (LWP 24897) exited]
[Thread 0x7ffff5572700 (LWP 24901) exited]
[Thread 0x7ffff6d75700 (LWP 24898) exited]
[Thread 0x7ffff5d73700 (LWP 24900) exited]
[Thread 0x7ffff6574700 (LWP 24899) exited]
[Thread 0x7ffff7576700 (LWP 24896) exited]

Program received signal SIGINT, Interrupt.
0x0000003bc4e080ad in pthread_join () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install 
tetware-OPENSAFFIRE-64-1.0-6.x86_64
    (gdb) bt
    #0  0x0000003bc4e080ad in pthread_join () from /lib64/libpthread.so.0
    #1  0x00000000004010dc in main ()
    (gdb) thread apply all bt
    Thread 12 (Thread 0x7fffef7fe700 (LWP 24903)):
    #0  0x0000003bc46eae93 in msgrcv () from /lib64/libc.so.6
    #1  0x0000003faec2da60 in ncs_os_mq () from /usr/lib64/libopensaf_core.so.0
    #2  0x0000003faec2dd54 in ncs_os_posix_mq () from 
/usr/lib64/libopensaf_core.so.0
    #3  0x00007ffff7dc5ada in ?? () from /usr/lib64/libSaMsg.so.1
    #4  0x00007ffff7dc6b40 in saMsgMessageGet () from /usr/lib64/libSaMsg.so.1
    #5  0x0000000000400dd8 in msgget_loop ()
    #6  0x0000000000400e49 in msgget_thread ()
    #7  0x0000003bc4e07851 in start_thread () from /lib64/libpthread.so.0
    #8  0x0000003bc46e890d in clone () from /lib64/libc.so.6
    Thread 3 (Thread 0x7ffff7d96b00 (LWP 24894)):
    #0  0x0000003bc46df253 in poll () from /lib64/libc.so.6
    #1  0x0000003faec40adf in mdtm_process_recv_events_tcp () from 
/usr/lib64/libopensaf_core.so.0
    #2  0x0000003bc4e07851 in start_thread () from /lib64/libpthread.so.0
    #3  0x0000003bc46e890d in clone () from /lib64/libc.so.6
    Thread 2 (Thread 0x7ffff7db6b00 (LWP 24893)):
    #0  0x0000003bc46e14f3 in select () from /lib64/libc.so.6
    #1  0x0000003faec1e68b in ?? () from /usr/lib64/libopensaf_core.so.0
    #2  0x0000003bc4e07851 in start_thread () from /lib64/libpthread.so.0
    #3  0x0000003bc46e890d in clone () from /lib64/libc.so.6
    Thread 1 (Thread 0x7ffff7db9700 (LWP 24890)):
    #0  0x0000003bc4e080ad in pthread_join () from /lib64/libpthread.so.0
    #1  0x00000000004010dc in main ()




---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to