Coder Social home page Coder Social logo

Comments (27)

pyroscope avatar pyroscope commented on July 26, 2024

See http://developers.sun.com/solaris/articles/signalprimer.html
Linux behaves differently when deciding which thread signals are handed to.

It's likely that the solution is to block SIGUSR1 in the xmlrpc thread (using thr_sigsetmask or pthread_sigmask), so it always is routed to the main thread as intended. Right now, the 2nd thread likely keeps its default mapping to exit.

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

That isn't a solution, as a new thread has been introduced for handling hash checking and thus it is required to be able to send the signal to the targeted thread, not just main.

The pthread_kill call http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_kill.html sends signals to specific threads, however it seems Solaris does not support this feature. So the signals used for poking threads to wake them up will not work.

A replacement can be done using sockets per thread and just write to them, however I'm not really going to prioritize that work. So for the moment Solaris isn't going to be supported.

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

This is a real bummer. I'm glad you were able to figure out what the problem was. I understand why this isn't a priority for you.

I hope this is something you will look back on and solve at some point. I guess i'll have to keep using 0.8.6 for now….I just hope it's something that can be fixed before the trackers i use require me to upgrade to a newer version.

Thomas Burgess
Sent with Sparrow (http://www.sparrowmailapp.com)

On Friday, April 6, 2012 at 7:04 AM, Jari Sundell wrote:

That isn't a solution, as a new thread has been introduced for handling hash checking and thus it is required to be able to send the signal to the targeted thread, not just main.

The pthread_kill call http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_kill.html sends signals to specific threads, however it seems Solaris does not support this feature. So the signals used for poking threads to wake them up will not work.

A replacement can be done using sockets per thread and just write to them, however I'm not really going to prioritize that work. So for the moment Solaris isn't going to be supported.


Reply to this email directly or view it on GitHub:
#51 (comment)

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

are you saying pthread_kill is DIFFERENT on solaris, or that it doesn't exist?

The reason i ask is "man pthread_kill" gives the following info:

http://www.pastie.org/3743903

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

Yes, Solaris doesn't implement it properly.

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

I know this was closed awhile back but i was wondering if enough time has passed to get some movement on solaris support.

Rtorrent works but when using xmlrpc-c, it fails.

Thanks, will pay/donate for this work.

from rtorrent.

btblog avatar btblog commented on July 26, 2024

I don't know if this will cause other problems, but I 'fixed' it by changing

src/main.cc line #206:

SignalHandler::set_handler(SIGUSR1, sigc::ptr_fun(&do_nothing));

replacing it with this:

SignalHandler::set_ignore(SIGUSR1);

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

i will try it now.

Thomas Burgess
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, August 17, 2012 at 9:16 PM, bonjourtristesse wrote:

I don't know if this will cause other problems, but I 'fixed' it by changing
src/main.cc (http://main.cc) line #206:
SignalHandler::set_handler(SIGUSR1, sigc::ptr_fun(&do_nothing));
replacing it with this:
SignalHandler::set_ignore(SIGUSR1);


Reply to this email directly or view it on GitHub (#51 (comment)).

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

i can't get it to build on solaris because i can't get ./autogen to work. I will have to wait for the version which has a ./configure file

Thomas Burgess
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, August 17, 2012 at 9:16 PM, bonjourtristesse wrote:

I don't know if this will cause other problems, but I 'fixed' it by changing
src/main.cc (http://main.cc) line #206:
SignalHandler::set_handler(SIGUSR1, sigc::ptr_fun(&do_nothing));
replacing it with this:
SignalHandler::set_ignore(SIGUSR1);


Reply to this email directly or view it on GitHub (#51 (comment)).

from rtorrent.

btblog avatar btblog commented on July 26, 2024

Nevermind, my hack eventually puts the program in a deadlock after awhile. We'll have to wait for someone who knows what they are doing to fix this.

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

i would still be willing to donate/pay for this work considering it's something i can afford.

Thomas Burgess
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Saturday, August 25, 2012 at 1:15 PM, btblog wrote:

Nevermind, my hack eventually puts the program in a deadlock after awhile. We'll have to wait for someone who knows what they are doing to fix this.


Reply to this email directly or view it on GitHub (#51 (comment)).

from rtorrent.

joshedmonds avatar joshedmonds commented on July 26, 2024

+1, I am also willing to donate for this!

For me, I am getting SIGUSR1 upon a hash check.

Can you please assess the effort required to get this working on Solaris 11? This porting guide seems to indicate that the implementation of pthread_kill is the same on both Linux and Solaris 11. http://www.oracle.com/technetwork/server-storage/solaris11/documentation/o12-026-linux2solaris-guide-1686620.pdf . (I'm not a developer so happy to be corrected)

Additional reference here: http://docs.oracle.com/cd/E19963-01/html/821-1601/tlib-1.html

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

One way of fixing this issue is to create a socket for each thread, and when you want to wake the thread up you write to that socket.

I've but this on my todo list, however not sure when I'll get to it.

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

at least 2 people are willing to help fund this work, just let us know what to do

from rtorrent.

joshedmonds avatar joshedmonds commented on July 26, 2024

wonslung, I donated almost 2 weeks ago - if you're willing to do the same maybe Jari can bump up the priority of this issue?

from rtorrent.

wonslung avatar wonslung commented on July 26, 2024

i'd be glad to donate if i could get a good faith agreement that work will be done to further this end. also wouldn't hurt to know how much money is needed for said work

Thomas Burgess
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, February 22, 2013 at 8:34 PM, joshedmonds wrote:

wonslung, I donated almost 2 weeks ago - if you're willing to do the same maybe Jari can bump up the priority of this issue?


Reply to this email directly or view it on GitHub (#51 (comment)).

from rtorrent.

joshedmonds avatar joshedmonds commented on July 26, 2024

Personally I don't think thats the best attitude to take, but that's just me. Considering Solaris is a minority platform, I doubt there's much of an incentive for the devs to give it a high priority.. Why not donate whatever you can afford (as you keep saying you're happy to do) and have some 'faith' that it will be worked on? The least you would be doing is showing support for an excellent piece of OSS.

In the interim until there's a solution to this issue, I'm happy with the latest rtorrent running on Linux with my torrent data mounted over NFS from my Solaris box.

BTW Rakshasa, thanks for reopening this issue!

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

Well, compared to other stuff on the todo list this is pretty clear and straightforward.

Just need to find the time.

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

Pushed an implementation, don't have time to test and debug it so someone who has time should take a look.

from rtorrent.

btblog avatar btblog commented on July 26, 2024

Just tried the latest updates and I still get "User Signal 1" and program exits

from rtorrent.

rakshasa avatar rakshasa commented on July 26, 2024

Remember to include '--enable-interrupt-socket' when running configure.

from rtorrent.

btblog avatar btblog commented on July 26, 2024

Yep. I made sure of it. Still crashes out.

However, I reapplied my hack to ignore SIGUSR1, and it seems to be working now. Will report back if anything changes

from rtorrent.

btblog avatar btblog commented on July 26, 2024

Still getting deadlocks after awhile.

Did some digging and I've noticed that pthread_kill is still being used twice in rtorrent/src/thread_base.cc

I think we need to patch that for the new interrupt sockets.

from rtorrent.

blaenk avatar blaenk commented on July 26, 2024

Ew, sorry for that "referenced this issue from a commit" spam. I wasn't aware github was doing this while I force-pushed an amended commit.

Anyways, I believe I know what is causing this and have suggested a pull request (#127) which I hope fixes this problem. Please take a look at it, linked right above this comment.

I don't have access to a Solaris machine so I can't test if it fixes the problem, but I'm pretty sure this is the root of the problem discussed in this issue. The solution is a simple and portable (i.e. expected behavior) drop-in replacement of the signal() call with the sigaction() call.

You guys are welcome to try it as a patch by adding .patch to that url (like this) or by cloning my fork of the repository and checking out the sigaction branch (git checkout sigaction) and then building normally.

from rtorrent.

lotheac avatar lotheac commented on July 26, 2024

Applying blaenk's patch fixes this for me on Illumos (OmniOS).

from rtorrent.

blaenk avatar blaenk commented on July 26, 2024

@lotheac Thanks for confirming, I'm glad it helped. I was waiting for a confirmation (apparently it's been 3 months) since I don't have any Solaris-based systems (nor have I ever used one for that matter). Would really appreciate it if you could echo your confirmation in the associated pull request!

from rtorrent.

gzartman avatar gzartman commented on July 26, 2024

I'm curious if the patch(es) listed by Blaenk have been pushed to the main repository? I just installed the rtorrent 9.2 on latest illumos and I'm getting the same errors listed in this thread.

from rtorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.