Bug 137056 - multimedia/vlc: VLC 1.0.0 does not work on 7.1 + workaround patch
Summary: multimedia/vlc: VLC 1.0.0 does not work on 7.1 + workaround patch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-24 17:10 UTC by Václav Haisman
Modified: 2009-08-01 21:10 UTC (History)
0 users

See Also:


Attachments
file.diff (516 bytes, patch)
2009-07-24 17:10 UTC, Václav Haisman
no flags Details | Diff
sched.cxx.txt (2.08 KB, text/plain)
2009-07-24 18:27 UTC, Václav Haisman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Václav Haisman 2009-07-24 17:10:01 UTC
VLC 1.0.0 fails to start with the following errors:

[0x802511138] main input error: input thread could not be created at input/input.c:230 (Operation not permitted)
[0x802511138] main input error: cannot create input thread

The attached patch disables the section of code that causes it.

Fix: Patch attached with submission follows:
Comment 1 Václav Haisman 2009-07-24 18:27:26 UTC
This is the output of the attached test programme:
shell::wilx:~/tmp> ./sched
SCHED_FIFO:     1
SCHED_OTHER:    2
SCHED_RR:       3
policy: 1
pthread_attr_init (&attr):55:   0
pthread_attr_setschedpolicy (&attr, policy):56:         0
prio = sched_get_priority_min (policy):58:      0
pthread_attr_setschedparam (&attr, &schp):60:   0
pthread_create (thr, &attr, nothing, 0):63:     1, errno: 1
prio = sched_get_priority_max (policy):65:      31
pthread_attr_setschedparam (&attr, &schp):67:   0
pthread_create (thr, &attr, nothing, 0):70:     1, errno: 1


policy: 2
pthread_attr_init (&attr):55:   0
pthread_attr_setschedpolicy (&attr, policy):56:         0
prio = sched_get_priority_min (policy):58:      0
pthread_attr_setschedparam (&attr, &schp):60:   0
pthread_create (thr, &attr, nothing, 0):63:     0
prio = sched_get_priority_max (policy):65:      63
pthread_attr_setschedparam (&attr, &schp):67:   0
pthread_create (thr, &attr, nothing, 0):70:     0


policy: 3
pthread_attr_init (&attr):55:   0
pthread_attr_setschedpolicy (&attr, policy):56:         0
prio = sched_get_priority_min (policy):58:      0
pthread_attr_setschedparam (&attr, &schp):60:   0
pthread_create (thr, &attr, nothing, 0):63:     1, errno: 1
prio = sched_get_priority_max (policy):65:      31
pthread_attr_setschedparam (&attr, &schp):67:   0
pthread_create (thr, &attr, nothing, 0):70:     1, errno: 1


EPERM:  1
EINVAL:         22
ENOSYS:         78
ESRCH:  3

It is apparent that it is possible to create threads only with SCHED_OTHER
scheduling policy. The code in VCL 1.0.0 attempts to use SCHED_RR and which
blows up in pthread_create().

--
VH
Comment 2 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:09:13 UTC
ports/137056 has recently been submitted. If it contains a patch can you
please review it and approve or not. Thanks.

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137056
Comment 3 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:09:22 UTC
State Changed
From-To: open->feedback

Pending maintainer feedback. 


Comment 4 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:09:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 5 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:11:30 UTC
ports/137056 has recently been submitted. If it contains a patch can you
please review it and approve or not. Thanks.

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137056
Comment 6 Václav Haisman 2009-07-26 15:00:57 UTC
I have just updated to 7.2 and it fixes the posted test case. So, it seems
that the patch is necessary only for 7.1 and older releases.

--
VH
Comment 7 Joseph S. Atkinson 2009-07-28 04:56:40 UTC
I am unable to test this personally at this time. Considering the source and
the taker, I trust them to be responsible in this regard. I approve.
Comment 8 Wesley Shields freebsd_committer freebsd_triage 2009-08-01 21:07:29 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 9 dfilter service freebsd_committer freebsd_triage 2009-08-01 21:07:37 UTC
wxs         2009-08-01 20:07:21 UTC

  FreeBSD ports repository

  Modified files:
    multimedia/vlc       Makefile 
  Added files:
    multimedia/vlc/files extra-patch-src_misc_thread.c 
  Log:
  - Correct a threading bug on 7.1 and older.
  
  PR:             ports/137056
  Submitted by:   Vaclav Haisman <v.haisman@sh.cvut.cz>
  Approved by:    "Joseph S. Atkinson" <jsa.bsd@gmail.com> (maintainer)
  
  Revision  Changes    Path
  1.192     +5 -0      ports/multimedia/vlc/Makefile
  1.1       +11 -0     ports/multimedia/vlc/files/extra-patch-src_misc_thread.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"