Bug #383

perl-javascript seg. faulting

Added by bigtoedsloth about 15 years ago. Updated almost 13 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:brfransen % Done:

100%

Category:Packages: Core Spent time: 4.00 hours
Target version:7.1

Description

This is related to [[http://linhes.org/flyspray/index.php?do=details&task_id=282|report 282]] and the perl dependencies of the Shepherd tv_grab_au script.

The two most important grabbers use the perl JavaScript module and both produce a segmentation fault when using the perl-javascript package. I uninstalled perl-javascript (keeping the spidermonkey dependency) and reinstalled the JavaScript module using cpan. Now the scripts work, or at least are no longer seg. faulting.

shepherd.log (73.3 kB) admin, 07/24/2009 12:27 am

shepherd.log (73.3 kB) admin, 07/24/2009 12:28 am

Associated revisions

Revision 94fc062c
Added by brfransen almost 13 years ago

perl-javascript: Bump to latest & fix deps; refs #383

Revision 5e3fdf55
Added by brfransen almost 13 years ago

perl-test-exception: Initial Inclusion. dep of perl-javascript; refs #383

Revision 29d5baf1
Added by brfransen almost 13 years ago

perl-sub-uplevel: Initial Inclusion. dep of perl-test-exception; refs #383

Revision deda8d8b
Added by brfransen almost 13 years ago

perl-javascript: still broken; upstream bugs with new js. refs #383

Revision b4b0e51c
Added by brfransen almost 13 years ago

js: Roll back to v1.7.0 for perl-javascript dep of shepherd. refs #383

Revision 504fe7ac
Added by brfransen almost 13 years ago

perl-javascript: Change js dep version to stop breakage. refs #383

History

Updated by cecil about 15 years ago

Can you please provide more information. Others have report no issue w/ the package. Perhaps an output of the segfault.

Updated by bigtoedsloth about 15 years ago

This is the type of thing I was seeing in /var/log/messages.log

Jun 9 09:45:08 mythbox news7327: segfault at 465475 ip b7fbe4f0 sp bfc72990 error 4 in libpthread-2.9.so[b7fb7000+14000]
Jun 9 09:45:08 mythbox rex7331: segfault at 4499a38a ip b7ee64f0 sp bff9b4c0 error 4 in libpthread-2.9.so[b7edf000+14000]

And the code which dies is the following (actually the $jsc->eval line)

sub setup_javascript { print "Initializing JavaScript interpreter.\n" if ($debug); $jsc = new JavaScript::Runtime->create_context(); $jsc->set_error_handler( sub { } ) if (exists(&JavaScript::Context::set_error_handler)); $jsc->eval(qq{ var doc = ''; function Location() { this.href = '$DATASOURCE'; } function Document() { this.write = function(x) { doc += x; } } function Window() { this.___ww = 0 } location = new Location; document = new Document; window = new Window; }); }

When I installed the JavaScript module I was asked if spidermonkey was threadsafe, to which I answered yes (after checking the compile flags in http://knoppmyth.net/repo/src_packages/extra-testing/spidermonkey-1.7.0-2.src.tar.gz). All of the tests passed fine.

Updated by soundoff about 15 years ago

I am having a similar problem to others with shepherd segfaulting.

R6.0.0.8 Fresh Install. Then I installed shepherd using:

sudo -Sy shepherd-dep cd~ wget http://www.whuffy.com/shepherd/shepherd perl shepherd

The install worked great. Even grabbed nice channel icons for me. very cool.

I then ran mythfilldatabase and it segfaulted.. so i did the following:

[root@mythtv ~]# pacman -Sy shepherd-dep :: Synchronizing package databases... core-testing is up to date extra-testing is up to date shepherd-dep package not found, searching for group... :: group shepherd-dep (including ignored packages): perl-algorithm-diff perl-digest-sha1 perl-javascript perl-list-compare perl-pathtools :: Install whole content? [Y/n] Y warning: perl-algorithm-diff-1.1902-4 is up to date -- reinstalling warning: perl-digest-sha1-2.11-4 is up to date -- reinstalling warning: perl-javascript-1.12-2 is up to date -- reinstalling warning: perl-list-compare-0.37-2 is up to date -- reinstalling warning: perl-pathtools-3.29-2 is up to date -- reinstalling resolving dependencies... looking for inter-conflicts... Targets (5): perl-algorithm-diff-1.1902-4 perl-digest-sha1-2.11-4 perl-javascript-1.12-2 perl-list-compare-0.37-2 perl-pathtools-3.29-2 Total Download Size: 0.00 MB Total Installed Size: 1.10 MB Proceed with installation? [Y/n] Y checking package integrity... (5/5) checking for file conflicts [#####################] 100% (1/5) upgrading perl-algorithm-diff [#####################] 100% (2/5) upgrading perl-digest-sha1 [#####################] 100% (3/5) upgrading perl-javascript [#####################] 100% (4/5) upgrading perl-list-compare [#####################] 100% (5/5) upgrading perl-pathtools [#####################] 100% [root@mythtv ~]# su mythtv [mythtv@mythtv root]$ mythfilldatabase 2009-07-03 19:52:49.220 Using runtime prefix = /usr 2009-07-03 19:52:49.221 Empty LocalHostName. 2009-07-03 19:52:49.221 Using localhost value of mythtv 2009-07-03 19:52:49.222 Testing network connectivity to 10.1.1.11 2009-07-03 19:52:49.240 New DB connection, total: 1 2009-07-03 19:52:49.245 Connected to database 'mythconverg' at host: 10.1.1.11 2009-07-03 19:52:49.246 Closing DB connection named 'DBManager0' 2009-07-03 19:52:49.247 Connected to database 'mythconverg' at host: 10.1.1.11 2009-07-03 19:52:49.251 New DB connection, total: 2 2009-07-03 19:52:49.252 Connected to database 'mythconverg' at host: 10.1.1.11 2009-07-03 19:52:49.253 Updating source #10 (DigitalTV) with grabber tv_grab_au 2009-07-03 19:52:49.254 Found 8 channels for source 10 which use grabber 2009-07-03 19:52:49.839 Grabber has capabilities: baseline manualconfig preferredmethod 2009-07-03 19:52:50.403 Grabber prefers method: allatonce 2009-07-03 19:52:50.404 New DB connection, total: 3 2009-07-03 19:52:50.405 Connected to database 'mythconverg' at host: 10.1.1.11 2009-07-03 19:52:50.407 XMLTVConfig entry in settings table missing, falling back to old behavior 2009-07-03 19:52:50.407 XMLTV config file is: /home/mythtv/.mythtv/DigitalTV.xmltv sh: line 1: 17259 Segmentation fault PERL5LIB="/home/mythtv/.shepherd/references" /home/mythtv/.shepherd/grabbers/news/news --region 75 --output /home/mythtv/.shepherd/grabbers/news/output-0.xmltv --days 8 --channels_file /home/mythtv/.shepherd/channels.conf.tmp 2>&1 sh: line 1: 17263 Segmentation fault PERL5LIB="/home/mythtv/.shepherd/references" /home/mythtv/.shepherd/grabbers/rex/rex --region 75 --output /home/mythtv/.shepherd/grabbers/rex/output-0.xmltv --days 8 --channels_file /home/mythtv/.shepherd/channels.conf.tmp 2>&1

Any help would be greatly appreciated. I am so close to having a fully functioning myth system again!! Please let me know if there is any further info i can provide

Updated by harveythedog about 15 years ago

Same segfault problem here on a fresh R6.00.08

Shepherd installed "sudo pacman -S shepherd" no problems.

Both rex and news grabbers show "failed code 139" in "~/.shepherd/shepherd --status" and shepherd.log

06:03:11 HTPC news14848: segfault at 2d ip b7ee74f0 sp bfa9bfc0 error 4 in libpthread-2.9.so[b7ee0000+14000]
06:03:11 HTPC rex14852: segfault at 8000000d ip b7f4c4f0 sp bfd00a30 error 4 in libpthread-2.9.so[b7f45000+14000]

Unless users run shepherd(mythfilldatabase) manually, or check their shepherd.log file they probably will not be aware of this problem as other grabbers within shepherd will usually be able to provide tv data. Running something like "mythfilldatabase --graboptions '--notquiet --notimetest'" would let you watch shepherd run and perhaps be helpful?

Updated by bigb over 14 years ago

I installed JavaScript using cpan and answered 'yes' for threadsafe spidermonkey, then 'no' for the other questions. The compile proceeded a lot better than when i had answered 'no' for threadsafe.

Do this has stopped the seg faults, and shepherd now uses the news and rex grabbers successfully. Attempts where I'd answered no for threadsafe didn't not fix my issues.

Updated by brfransen almost 13 years ago

  • Assignee changed from cecil to brfransen
  • % Done changed from 0 to 100
  • Category set to Packages: Core
  • Status changed from New to Closed
  • Target version set to 7.1

Also available in: Atom PDF