Opened 7 years ago

Closed 6 years ago

#6554 closed defect (fixed)

fate-sws-pixdesc-query fails on big-endian systems

Reported by: James Cowgill Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The "fate-sws-pixdesc-query" test fails on all big-endian systems.

Full build log for mips big endian (but the same error happens on various other architectures):
https://buildd.debian.org/status/fetch.php?pkg=ffmpeg&arch=mips&ver=7%3A3.3.2-1&stamp=1501113121&raw=0

Manually run on latest git master:

$ LD_LIBRARY_PATH="libavcodec:libavdevice:libavfilter:libavformat:libavresample:libavutil:libpostproc:libswresample:libswscale" make fate-sws-pixdesc-query
TEST    sws-pixdesc-query
--- /build/upstream/tests/ref/fate/sws-pixdesc-query    2017-07-27 11:47:57.377857169 +0000
+++ tests/data/fate/sws-pixdesc-query   2017-07-27 12:05:45.276166571 +0000
@@ -407,8 +407,8 @@
   rgb8
   rgb4
   rgb4_byte
-  abgr
-  bgra
+  argb
+  rgba
   rgb48be
   rgb48le
   rgb565be
@@ -427,8 +427,8 @@
   bgr8
   bgr4
   bgr4_byte
-  argb
-  rgba
+  abgr
+  bgra
   bgr565be
   bgr565le
   bgr555be
Test sws-pixdesc-query failed. Look at tests/data/fate/sws-pixdesc-query.err for details.
/build/upstream/tests/Makefile:221: recipe for target 'fate-sws-pixdesc-query' failed

As far as I can tell, this probably has something to do with AV_PIX_FMT_RGB32 being different on big and little endian systems, but I havn't investigated that much.

If you fix this, please can you also fix this on the 3.3 branch.

Change History (7)

comment:1 by Carl Eugen Hoyos, 7 years ago

Please disable the test in the Debian tree for the time being, two ways of fixing the issue are currently discussed.
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/214063.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/214031.html

comment:2 by Carl Eugen Hoyos, 7 years ago

Can you see what the issue is on hurd-386?

comment:3 by James Cowgill, 7 years ago

I rebuilt FFmpeg on hurd-i386.
The "random-seed" test prints one line:

seeds OK

and then hangs running at 100% cpu.

in reply to:  3 comment:4 by Carl Eugen Hoyos, 7 years ago

Replying to jcowgill:

I rebuilt FFmpeg on hurd-i386.
The "random-seed" test prints one line:

seeds OK

and then hangs running at 100% cpu.

Could you provide a backtrace?

comment:5 by James Cowgill, 7 years ago

Backtrace:

Thread 4 received signal SIGINT, Interrupt.
0x010e99ac in ?? () from /lib/i386-gnu/libc.so.0.3
(gdb) bt full
#0  0x010e99ac in ?? () from /lib/i386-gnu/libc.so.0.3
No symbol table info available.
#1  0x010ea146 in mach_msg () from /lib/i386-gnu/libc.so.0.3
No symbol table info available.
#2  0x014a815f in task_info () from /lib/i386-gnu/libmachuser.so.1
No symbol table info available.
#3  0x01199293 in clock () from /lib/i386-gnu/libc.so.0.3
No symbol table info available.
#4  0x0804883b in get_generic_seed () at ../../libavutil/random_seed.c:90
        t = 641
        tmp = {387303105400112, 38673001005, 42969484128, 78615687009941752, 75873809939188576, 78620694928044032, 577779685240228704, 85058219524751369, 387303004453112, 85058219543056457, 85058219544548416, 
          78402587912583416, 42969484128, 12884901896, 85088318678018268}
        sha = 0x2003860
        last_t = 641
        last_td = 0
        init_t = 1
        i = 0
        buffer = {4037960086, 0 <repeats 511 times>}
        digest = "HvO\001\001\000\000\000\264\006\000\000\t\000\000\000\b\000\000"
        last_i = 0
#5  0x08048b93 in main () at random_seed.c:40
        i = 0
        j = 255
        rsf = 1
        retry = 0
        seeds = {3026426818, 749081207, 3405689109, 2546097460, 2465360384, 2570893202, 2606530739, 3431220608, 4008492973, 4143899524, 3096593066, 3371987955, 161614033, 4016259976, 1587062487, 2909450168, 
          961409833, 1528982980, 430515943, 1219905367, 946159253, 3976062468, 1828855618, 956069965, 3876946781, 1018124518, 4145421369, 3807256498, 444452848, 1657368324, 2458199673, 257501308, 1739610353, 
          1373478905, 2117080854, 151405535, 2290341868, 3780133243, 1368163935, 3202180119, 2637010907, 1100575305, 1456524694, 882326751, 3334169915, 2129951371, 3956716445, 399142705, 2170315480, 
          3305729945, 2083140767, 2015169219, 477127453, 475613857, 3739234530, 413746865, 2268823968, 3753322342, 2961884903, 1354733529, 1507788407, 1233258061, 3603145843, 2192954428, 4229001233, 
          3216668262, 579491661, 2138090065, 3685236866, 2984253194, 54627836, 929924828, 3646562495, 1493379580, 4044377288, 431147217, 997609147, 3668802732, 3514334747, 4085542059, 629101389, 2737498713, 
          859401195, 2174687119, 1191002800, 3820981330, 2545648833, 1606576600, 626284401, 2516589224, 1907199421, 2236211742, 525368065, 4115173640, 1588847978, 1159018275, 3715070319, 3567023292, 
          1267011720, 1762308733, 246622143, 70677152, 1595357820, 308965094, 1974368370, 990715666, 2250138124, 2758413313, 1775194560, 1149142321, 1837005977, 4241005723, 4291168285, 1703908866, 4147093488, 
          913618321, 1771069384, 665871157, 3307654714, 4027190694, 1975404472, 893272191, 1825290548, 997863337, 4161407269, 4008529609, 565241568, 3506564495, 2237898027, 1607166753, 946714134, 3117344332, 
          1052218635, 329902760, 1882670529, 441599823, 2385984031, 3233865550, 3850945799, 3799636505, 52718127, 1775653579, 1963401624, 628156090, 1221124682, 2942415934, 1695709341, 507581681, 1910020354, 
          2795648124, 4260364079, 1813438959, 748455325, 1936854498, 2761596219, 1911994450, 3981442224, 2889306495, 3822613539, 1151902896, 2730053681, 1751670493, 170478344, 2984665039, 255473563, 
          1852476406, 2786529241, 2695592260, 2762014264, 2091792306, 2866572911, 96985045, 377559064, 3453523507, 3562902117, 2446243452, 1633322373, 1463471211, 1540420494, 1934685369, 3551561957, 
          2562995843, 3644488024, 286887234, 4827121, 1868831162, 4289117515, 1766023351, 254644180, 701130441, 1783012531, 3268231355, 3021441448, 48872940, 3682049179, 3161803385, 2297713071, 3032162227, 
          1470575590, 2078575939...}
        random_seed = {0x8048af8 <av_get_random_seed>, 0x8048791 <get_generic_seed>}

FYI, I posted this thread on the debian-hurd list because it seems to me that clock is returning values of the wrong precision (1000 clock ticks per second instead of 1000000). If I multiply the return value of clock by 1000, then get_generic_seed does eventually return, but it takes about 1 minute for the second "seeds OK" to print (but maybe that's good enough for Hurd?)

https://lists.debian.org/debian-hurd/2017/07/msg00054.html

comment:6 by Clément Bœsch, 7 years ago

The fate-sws-pixdesc-query test should be fixed in 4158fba3cdb7c90f42071323f37f617e4f278414.

This only fixes the test, not making any actual change to swscale itself.

comment:7 by James Cowgill, 6 years ago

Resolution: fixed
Status: newclosed

This is fixed.

Eventually the hurd bug was fixed in glibc and nothing needs to be changed in ffmpeg.

Note: See TracTickets for help on using tickets.