Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#17214 - [mythtv] fails to run with mysql 5.1.41

Attached to Project: Arch Linux
Opened by Matthew Gyurgyik (pyther) - Friday, 20 November 2009, 02:02 GMT
Last edited by Jürgen Hötzel (juergen) - Sunday, 06 December 2009, 20:46 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jürgen Hötzel (juergen)
Andrea Scarpino (BaSh)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: There is a C99 aliasing violation in the source of Mysql 5.1.40 which causes client
errors (specifically with MythTV but probably also with others) when Mysql is compiled
with -O3 optimization (GCC 4.4.2).

http://bugs.mysql.com/bug.php?id=48284

Basically mythtv is rendered useless due to this bug.
See this bbs thread: http://bbs.archlinux.org/viewtopic.php?id=85031

I have attached the patch to this bug report. It is a very simple patch which changes a char datatype to uchar datatype.

Of course this is a upstream bug, but it would be nice to get fixed as many people use mythtv on arch. This may also fix other applications. The patch is extremely minimal (changes one character) in the code.

This task depends upon

Closed by  Jürgen Hötzel (juergen)
Sunday, 06 December 2009, 20:46 GMT
Reason for closing:  Fixed
Comment by Tomas M. (eldragon) - Friday, 20 November 2009, 02:38 GMT
the patch is incomplete. there is an extra line needing mofidying (read bug report to know which one it is).

the patch builds the same, but there is a warning about casting to char **

i can verify this works correctly with mythtv.
Comment by Matthew Gyurgyik (pyther) - Friday, 20 November 2009, 02:52 GMT
Do you know exactly which line that code segment needs to be removed? I checked line 2554 but there was a comment at that line.
Comment by Andrea Scarpino (BaSh) - Friday, 20 November 2009, 10:40 GMT
  • Field changed: Summary ([mysql] 5.1.14 ( mythtv fails to run ) with fix → [mythtv] fails to run with mysql 5.1.41)
the problem is mythtv, not mysql
Comment by Tomas M. (eldragon) - Friday, 20 November 2009, 12:10 GMT
@ Mattew, line is 2568
it is store_param_type( (char **) &net->write_pos, param);
and should be store_param_type(&net->write_pos, param);

* Andrea
why is it its mythtv's fault?
Comment by Andrea Scarpino (BaSh) - Friday, 20 November 2009, 12:15 GMT
cause we don't know what other application uses store_param_type, I think mythtv should be fixed to work with 5.1.41, not viceversa.
Comment by Tomas M. (eldragon) - Friday, 20 November 2009, 12:27 GMT
so.. store_param_type is actually broken.. and since mythtv is the only app using it, mythtv should fix the issue NOT using it?

this is confusing...
Comment by Andrea Scarpino (BaSh) - Friday, 20 November 2009, 12:37 GMT
are you sure mysql 5.1.41-3 doesn't fix this too?
is built with
CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing"
CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing"
Comment by Matthew Gyurgyik (pyther) - Friday, 20 November 2009, 12:41 GMT
I agree with Tomas. The mythtv folks also believe this to be a mysql bug and not a mythtv bug see:

http://svn.mythtv.org/trac/ticket/6683 (Ticket that I was redirected to)
http://svn.mythtv.org/trac/ticket/7610 (The issue I created regarding the issue on arch)
http://mythtv.org/pipermail/mythtv-users/2009-November/271349.html (Continuation of MythTv Bug #7610)

mysql 5.1.41-3 may fix the problem at least according to the mysql bug report it should, but it seems like patching the code is a better solution. It isn't like the patch is huge or complex. Its simply changing the datatype of one variable.
Comment by Tomas M. (eldragon) - Friday, 20 November 2009, 12:52 GMT
there is the issue of shipping things as upstream CC as possible, so maybe building with the CFLAG option is a better solution.

havent tested 5.1.41-3, will do shortly.
Comment by Tomas M. (eldragon) - Friday, 20 November 2009, 13:02 GMT
yes, now it works as expected with 5.1.41-3

Comment by Matthew Gyurgyik (pyther) - Friday, 20 November 2009, 14:09 GMT
Generally I would agree, but I feel in this case it is better to fix the code, especially considering how trivial it is than using a "workaround".
Comment by Andrea Scarpino (BaSh) - Friday, 20 November 2009, 14:10 GMT
I don't like to patch mysql code. If this is fixed I close here.
Comment by Jeremy Sands (georgia_tech_swagger) - Thursday, 26 November 2009, 22:03 GMT
So ... some clarification I found out first hand ... the mysql 5.1.41-3 works with MythTV on i686. It DOES NOT however work on x86_64. x86_64 *requires* the patch mentioned on this thread.
Comment by Jan de Groot (JGC) - Thursday, 26 November 2009, 22:04 GMT
The CFLAGS need to be exported or passed in the same line as ./configure. The way it is set now has no effect.
Comment by Matthew Gyurgyik (pyther) - Thursday, 26 November 2009, 23:06 GMT
Not to be rude, but it must have had some effect because it resolved the issue.
Comment by Jan de Groot (JGC) - Friday, 27 November 2009, 09:59 GMT
On i686 there's no problem, so there's nothing to fix for that architecture.
Comment by Jürgen Hötzel (juergen) - Friday, 27 November 2009, 19:36 GMT
@JGC CFLAGS is already exported by makepkg. The CFLAGS reassignment in BaSh's PKGBUILD does not change the variable scope. So i consider this fixed.

Jürgen
Comment by Bill (QuimaxW) - Sunday, 29 November 2009, 21:37 GMT
I'm on x86_64
Running MySQL package 5.1.41-3 & mythtv 0.22-3 and all is working here. Perhaps a revisit to ensure this really is still an issue.

Loading...