1100101 / Automatic

RSS downloader for Transmission
GNU General Public License v2.0
63 stars 13 forks source link

Daemon does not show #6

Closed HoffmannP closed 11 years ago

HoffmannP commented 11 years ago

I start automatic but can't find it in the "ps" output. Is there any other possibility to check if automatic is running? btw. log-file ends with:

[13/01/08 13:29:42] ../src/automatic.c, 731: Daemon started

1100101 commented 11 years ago

To find out if Automatic is running in daemon mode, you have to use third-party tools like ps or top to check if there's a process running. Automatic does not write its process number to a pidfile currently.

To test if Automatic is running properly you can start it with the option '-f' to run in foreground mode. Then you'll see all the log output on-screen.

HoffmannP commented 11 years ago

Ok, what I get is:

Hoffmann@Server:~$ automatic -f
../src/automatic.c, 697: Automatic version: 0.8.1 (72bb72f)
../src/state.c, 109: Restored 0 old entries
../src/automatic.c, 290: 1 feed URLs
../src/automatic.c, 291: Read 1 filters from config file
 segmentation fault
1100101 commented 11 years ago

Uh, that's not good :/ For some reason Automatic crashes with a segfault, and we should figure out why.

Can you run the same command with debug logging enabled and provide me with the logfile?

automatic -f -v 4 -l automatic.log
HoffmannP commented 11 years ago

https://gist.github.com/4500535 see the logfile

1100101 commented 11 years ago

I got good news and bad news: The good news is that I fixed the crash. Automatic should not ever crash. It's a daemon :) The bad news is that the cause of the crash is the RSS feed you want to use. It's an invalid RSS feed ( see here), and Automatic choked on it. As a result of the fix, Automatic will skip all items of that particular feed, because they're not in proper format. The right thing to do is to tell the owner of that feed and ask him to fix it.

But: I've added a comment to commit c78838d that shows how you can modify one line of code so that feed gets parsed anyway.

Hope this helps!

1100101 commented 11 years ago

Can this issue be closed?

HoffmannP commented 11 years ago

Formally everything is right now, but in practice I hardly find any valid RSS-Torrent-Feed and hence can't use Automatic. If I find time I might help to add an "tolerant parser". (especially the difference between Atom and RSS feeds should make no difference for the user)

1100101 commented 11 years ago

I agree that the user shouldn't care if it's an Atom or RSS feed, but that is not the problem here. The feed you use is clearly invalid as it does not follow the specification for RSS. (Automatic is already rather tolerant, as it ignores many elements & attributes defined in the RSS spec).

Your feed was actually the first RSS feed I've so far stumbled upon that won't work with Automatic.

Atom feeds are currently not supported, as the parsing is a bit different. But since I haven't had to deal with Atom feeds so far, I didn't build in support.

1100101 commented 11 years ago

BTW: I just checked and the RSS feed from your log has been sufficiently fixed, so it should work with Automatic now with no code changes.