Zhao Yongming created TS-1746:
---------------------------------

             Summary: Crash report:  UnixNetVConnection::reenable > 
ink_atomiclist_push > ink_atomic_cas
                 Key: TS-1746
                 URL: https://issues.apache.org/jira/browse/TS-1746
             Project: Traffic Server
          Issue Type: Bug
          Components: Core
            Reporter: Zhao Yongming


I think the recent changes cause this crash, and here is the stack trace:


{code}
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2492700 (LWP 23610)]
0x00007ffff7bb30a5 in ink_atomic_cas<__int128> (mem=0x7ffff3cae288, 
prev=0x00000000000000000000000000000001, 
next=0x000000000000000000007fffd4014501)
    at ink_atomic.h:153
153       return __sync_bool_compare_and_swap(mem, prev, next);
(gdb) bt
#0  0x00007ffff7bb30a5 in ink_atomic_cas<__int128> (mem=0x7ffff3cae288, 
prev=0x00000000000000000000000000000001, 
next=0x000000000000000000007fffd4014501)
    at ink_atomic.h:153
#1  0x00007ffff7bb2e29 in ink_atomiclist_push (l=0x7ffff3cae288, 
item=0x7fffd4014500) at ink_queue.cc:481
#2  0x00000000006d8961 in AtomicSLL<UnixNetVConnection, 
UnixNetVConnection::Link_read_enable_link>::push (this=0x7ffff3cae288, 
c=0x7fffd4014500)
    at ../../lib/ts/List.h:477
#3  0x00000000006d6767 in UnixNetVConnection::reenable (this=0x7fffd4014500, 
vio=0x7fffd4014610) at UnixNetVConnection.cc:721
#4  0x00000000005195d5 in VIO::reenable (this=0x7fffd4014610) at 
../iocore/eventsystem/P_VIO.h:124
#5  0x00000000005c73b1 in HttpTunnel::consumer_handler (this=0x7fffdbefb888, 
event=101, c=0x7fffdbefb8c8) at HttpTunnel.cc:1237
#6  0x00000000005c7c1f in HttpTunnel::main_handler (this=0x7fffdbefb888, 
event=101, data=0x7fffc4008870) at HttpTunnel.cc:1481
#7  0x00000000004f8aa6 in Continuation::handleEvent (this=0x7fffdbefb888, 
event=101, data=0x7fffc4008870) at ../iocore/eventsystem/I_Continuation.h:146
#8  0x000000000050a612 in TSContCall (contp=0x7fffdbefb888, 
event=TS_EVENT_VCONN_WRITE_READY, edata=0x7fffc4008870) at InkAPI.cc:4400
#9  0x000000000055f302 in handle_transform (contp=0x7fffc40087c0) at 
InkAPITest.cc:6435
#10 0x000000000055f4be in transformtest_transform (contp=0x7fffc40087c0, 
event=TS_EVENT_IMMEDIATE, edata=0x1166920) at InkAPITest.cc:6501
#11 0x0000000000501922 in INKVConnInternal::handle_event (this=0x7fffc40087c0, 
event=1, edata=0x1166920) at InkAPI.cc:1045
#12 0x00000000004f8aa6 in Continuation::handleEvent (this=0x7fffc40087c0, 
event=1, data=0x1166920) at ../iocore/eventsystem/I_Continuation.h:146
#13 0x00000000006f823d in EThread::process_event (this=0x7ffff3aa9010, 
e=0x1166920, calling_code=1) at UnixEThread.cc:142
#14 0x00000000006f8491 in EThread::execute (this=0x7ffff3aa9010) at 
UnixEThread.cc:193
#15 0x00000000006f744c in spawn_thread_internal (a=0x1090810) at Thread.cc:88
#16 0x00007ffff793dea7 in start_thread () from /lib64/libpthread.so.0
#17 0x00007ffff51c114d in clone () from /lib64/libc.so.6
(gdb) l
148     // ink_atomic_cas(mem, prev, next)
149     // Atomically store the value @next into the pointer @mem, but only if 
the current value at @mem is @prev.
150     // Returns true if @next was successfully stored.
151     template <typename T> static inline bool
152     ink_atomic_cas(volatile T * mem, T prev, T next) {
153       return __sync_bool_compare_and_swap(mem, prev, next);
154     }
155
156     // ink_atomic_increment(ptr, count)
157     // Increment @ptr by @count, returning the previous value.
(gdb) f 1
#1  0x00007ffff7bb2e29 in ink_atomiclist_push (l=0x7ffff3cae288, 
item=0x7fffd4014500) at ink_queue.cc:481
481            result = ink_atomic_cas((__int128_t*) & l->head, head.data, 
item_pair.data);
(gdb) p head.data
$1 = 0x00000000000000000000000000000001
(gdb) p head
$2 = {s = {pointer = 0x1, version = 0}, data = 
0x00000000000000000000000000000001}
(gdb) 
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to