Opened 8 years ago

Closed 8 years ago

#5550 closed Bug (worksforme)

segfault in Curl_client_write

Reported by: hsn Owned by: jordan
Priority: Highest Milestone: None Set
Component: libtransmission Version: 2.82
Severity: Normal Keywords:
Cc:

Description

reproducible every time on Freebsd 9.2

here is backtrace

(gdb) bt #0 0x0000000800dc8065 in Curl_client_write () from /usr/local/lib/libcurl.so.7 #1 0x0000000800de13a9 in curl_easy_pause () from /usr/local/lib/libcurl.so.7 #2 0x000000000041f76b in tr_webThreadFunc (vsession=<value optimized out>)

at web.c:451

#3 0x0000000000407bba in ThreadFunc? (_t=0x803bffd80) at platform.c:108 #4 0x0000000801e86d34 in pthread_getprio () from /lib/libthr.so.3 #5 0x0000000000000000 in ?? ()

Change History (13)

comment:1 Changed 8 years ago by livings124

  • Component changed from Transmission to libtransmission
  • Owner set to jordan

comment:2 Changed 8 years ago by mike.dld

Unable to reproduce with either release (r14160) or current trunk (r14216). FreeBSD 9.2-RELEASE, both i386 and amd64, with curl 7.31.0_1.

Any details on you environment? Like whether you use GCC or Clang, what are the library versions, when exactly does the crash happen? Some steps to reproduce would be nice. Maybe even a code dump.

comment:3 Changed 8 years ago by hsn

it started after i add last torrent. its most likely web seed related.

comment:4 Changed 8 years ago by hsn

i think it started to crash after adding libreoffice 4.1.3 win x86.msi torrent

comment:5 Changed 8 years ago by cfpp2p

Thread 3 Crashed: 0 libcurl.4.dylib 0x00007fff95b45cc4 Curl_client_write + 26 1 libcurl.4.dylib 0x00007fff95b5d26d curl_easy_pause + 165 2 org.m0k.transmission 0x000000010008fbd4 tr_webThreadFunc + 1253 3 org.m0k.transmission 0x0000000100072916 ThreadFunc?? + 15 4 libsystem_c.dylib 0x00007fff9858c7a2 _pthread_start + 327 5 libsystem_c.dylib 0x00007fff985791e1 thread_start + 13

the above is from #5437 so either:

(1) the wrong version number was reported by the original poster of the ticket and it's then the same crash as #5437

or

(2) r14140 didn't fix the issue

comment:6 Changed 8 years ago by hsn

transmission-daemon --version transmission-daemon 2.82 (14160)

comment:7 Changed 8 years ago by x190

web.c Line 451 --- curl_easy_pause (handle, CURLPAUSE_CONT);

      /* add tasks from the queue */
      tr_lockLock (web->taskLock);
      while (web->tasks != NULL)
        {
          /* pop the task */
          task = web->tasks;
          web->tasks = task->next;
          task->next = NULL;

          dbgmsg ("adding task to curl: [%s]", task->url);
          curl_multi_add_handle (multi, createEasy (session, web, task));
          /*fprintf (stderr, "adding a task.. taskCount is now %d\n", taskCount);*/
          ++taskCount;
        }
      tr_lockUnlock (web->taskLock);

      /* unpause any paused curl handles */
      if (paused_easy_handles != NULL)
        {
          CURL * handle;
          tr_list * tmp;

          /* swap paused_easy_handles to prevent oscillation
             between writeFunc this while loop */
          tmp = paused_easy_handles;
          paused_easy_handles = NULL;

          while ((handle = tr_list_pop_front (&tmp)))
            curl_easy_pause (handle, CURLPAUSE_CONT);
        }


Try moving the following loc to after the while loop:

tr_lockUnlock (web->taskLock);

comment:8 Changed 8 years ago by hsn

after removing libre office torrent, it do not crash anymore. You should be able to reproduce it.

comment:10 Changed 8 years ago by mike.dld

Supposedely this one: http://download.documentfoundation.org/libreoffice/stable/4.1.3/win/x86/LibreOffice_4.1.3_Win_x86.msi.torrent (as per comment:4).

EDIT: Link is broken and only 4.1.4 is currently available. I wonder if that makes any difference.

Last edited 8 years ago by mike.dld (previous) (diff)

comment:11 Changed 8 years ago by hsn

its libre office for windows, available at their page

comment:12 follow-up: Changed 8 years ago by x190

hsn, please retest using the latest nightly. This issue may have been fixed by r14182??? I am not getting this crash with webseed:http://tdf.mirror.rafal.ca/libreoffice/stable/4.1.4/win/x86/LibreOffice_4.1.4_Win_x86.msi and r14215.

http://www.transmissionbt.com/download.php

Last edited 8 years ago by x190 (previous) (diff)

comment:13 in reply to: ↑ 12 Changed 8 years ago by x190

Replying to x190:

hsn, please retest using the latest nightly. This issue may have been fixed by r14182??? I am not getting this crash with webseed:http://tdf.mirror.rafal.ca/libreoffice/stable/4.1.4/win/x86/LibreOffice_4.1.4_Win_x86.msi and r14215.

http://www.transmissionbt.com/download.php

I can't get this torrent to crash using 2.82 release either. (OS X 10.6.8) hsn, more testing is needed. Can you build and run the latest nightly?

Also, please respond to comment:2.

Last edited 8 years ago by x190 (previous) (diff)

comment:14 Changed 8 years ago by livings124

  • Resolution set to worksforme
  • Status changed from new to closed

Please reopen if you can replicate with a nightly.

Note: See TracTickets for help on using tickets.