[x264-devel] Re: [BUG] bus error on Solaris

Vincent Torri vtorri at univ-evry.fr
Thu Oct 5 09:11:52 CEST 2006


I've read somewhere that -lpthreads should be used on solaris, instead of 
-lpthread on linux

maybe that can help

Vincent

On Thu, 5 Oct 2006, Christian Bienia wrote:

> Hello Loren,
>
>>> I'm getting bus errors on Solaris/Sparc:
>>>
>>> x264 -o eledream.264 eledream_640x360.yuv 640x360
>>> x264 [warning]: width or height not divisible by 16 (640x360),
>>> compression will suffer.
>>> x264 [info]: using cpu capabilities
>>> Bus Error (core dumped)
>>>
>>> Is this a known error?
>>
>> No. Bus Error usually signifies an unaligned memory access. But PPC has
>> the same restrictions on alignment of memory, and as far as I know x264 is
>> working on PPC.
>> So please provide a backtrace as http://ffmpeg.mplayerhq.hu/bugreports.html.
>
>
> Here's a more detailed description:
>
> (gdb) r -o eledream.264 eledream_640x360_32.yuv
> Starting program:
> /home/cbienia/labhome/splash3/bench/media/x264/inst/sparc-sola
> ris.gcc-debug/bin/x264 -o eledream.264 eledream_640x360_32.yuv
> warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
> x264 [info]: file name gives 640x360
> x264 [warning]: width or height not divisible by 16 (640x360),
> compression will
> suffer.
> x264 [info]: using cpu capabilities
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000477f0 in x264_mb_analyse_inter_p8x8 (h=0x389940, a=0x1)
>    at encoder/analyse.c:1027
> 1027        *(uint64_t*)mvc[0] = *(uint64_t*)a->l0.me16x16.mv;
> (gdb) bt
> #0  0x000477f0 in x264_mb_analyse_inter_p8x8 (h=0x389940, a=0x1)
>    at encoder/analyse.c:1027
> #1  0x0004bb64 in x264_macroblock_analyse (h=0x389940)
>    at encoder/analyse.c:2041
> #2  0x0001d640 in x264_slice_write (h=0x389940) at
> encoder/encoder.c:1050
> #3  0x0001e818 in x264_encoder_encode (h=0x389940, pp_nal=0xffbff7ec,
>    pi_nal=0xffbff7e8, pic_in=0xffbff8e0, pic_out=0xffbff7f0)
>    at encoder/encoder.c:1183
> #4  0x000143a8 in Encode_frame (h=0x389940, hout=0x388f50,
> pic=0xffbff8e0)
>    at x264.c:702
> #5  0x00014654 in Encode (param=0xffbff9a0, opt=0xffbff98c) at
> x264.c:788
> #6  0x00013214 in main (argc=Variable "argc" is not available.
> ) at x264.c:110
>
>
>
> (gdb) disass $pc-32 $pc+32
> Dump of assembler code from 0x477d0 to 0x47810:
> 0x000477d0 <x264_mb_analyse_inter_p8x8+220>:    st  %g2, [ %fp + -20 ]
> 0x000477d4 <x264_mb_analyse_inter_p8x8+224>:    mov  0xd, %g2
> 0x000477d8 <x264_mb_analyse_inter_p8x8+228>:    sethi  %hi(0x1c00), %g1
> 0x000477dc <x264_mb_analyse_inter_p8x8+232>:    or  %g1, 0x26c, %g1
> ! 0x1e6c
> 0x000477e0 <x264_mb_analyse_inter_p8x8+236>:    st  %g2, [ %i0 + %g1 ]
> 0x000477e4 <x264_mb_analyse_inter_p8x8+240>:    ld  [ %fp + -20 ], %g3
> 0x000477e8 <x264_mb_analyse_inter_p8x8+244>:    st  %g3, [ %fp + -28 ]
> 0x000477ec <x264_mb_analyse_inter_p8x8+248>:    ld  [ %fp + 0x48 ], %g1
> 0x000477f0 <x264_mb_analyse_inter_p8x8+252>:    ldd  [ %g1 + 0x1b8 ],
> %g2
> 0x000477f4 <x264_mb_analyse_inter_p8x8+256>:    std  %g2, [ %o4 + %g4 ]
> 0x000477f8 <x264_mb_analyse_inter_p8x8+260>:    clr  %l7
> 0x000477fc <x264_mb_analyse_inter_p8x8+264>:    clr  %i2
> 0x00047800 <x264_mb_analyse_inter_p8x8+268>:    add  %g1, 0x444, %g2
> 0x00047804 <x264_mb_analyse_inter_p8x8+272>:    st  %g2, [ %fp + -32 ]
> 0x00047808 <x264_mb_analyse_inter_p8x8+276>:    sll  %i3, 2, %g1
> 0x0004780c <x264_mb_analyse_inter_p8x8+280>:    add  %g1, %i0, %g1
> End of assembler dump.
>
>
>
> (gdb) info all-registers
> g0             0x0      0
> g1             0xffbfd244       -4206012
> g2             0xd      13
> g3             0xffbfd408       -4205560
> g4             0x0      0
> g5             0xffbfd404       -4205564
> g6             0x0      0
> g7             0xff3a2000       -12967936
> o0             0x0      0
> o1             0x0      0
> o2             0x2800   10240
> o3             0x2c12   11282
> o4             0xffbfd408       -4205560
> o5             0x0      0
> sp             0xffbfd138       0xffbfd138
> o7             0x47790  292752
> l0             0xffbfd244       -4206012
> l1             0x111    273
> l2             0x1      1
> l3             0x0      0
> l4             0x1e68   7784
> l5             0x0      0
> l6             0x27     39
> l7             0x8      8
> i0             0x389940 3709248
> i1             0x1      1
> i2             0x8d9c0  580032
> i3             0x0      0
> i4             0x38bcc0 3718336
> i5             0x38bce0 3718368
> fp             0xffbfd1c0       0xffbfd1c0
> i7             0x4bb5c  310108
> f0             1.87499988       (raw 0x3fefffff)
> f1             -2.65845599e+36  (raw 0xfc000000)
> f2             7.74658966       (raw 0x40f7e410)
> f3             0        (raw 0x00000000)
> f4             1.73621655       (raw 0x3fde3c58)
> f5             0        (raw 0x00000000)
> f6             176      (raw 0x43300000)
> f7             0        (raw 0x00000000)
> f8             -nan(0x3fc800)   (raw 0xffbfc800)
> f9             -nan(0x3ff5b0)   (raw 0xffbff5b0)
> f10            1.2779842e-41    (raw 0x000023a0)
> f11            1.0235084e-41    (raw 0x00001c88)
> f12            0        (raw 0x00000000)
> f13            26       (raw 0x41d00000)
> f14            379.604614       (raw 0x43bdcd64)
> f15            -nan(0x7fffff)   (raw 0xffffffff)
> f16            -2.6875  (raw 0xc02c0000)
> f17            0        (raw 0x00000000)
> f18            27.9999981       (raw 0x41dfffff)
> f19            -nan(0x400000)   (raw 0xffc00000)
> f20            7.74658585       (raw 0x40f7e408)
> f21            5.79355938e+29   (raw 0x70ea0000)
> f22            1.8696413        (raw 0x3fef5068)
> f23            1.08420217e-19   (raw 0x20000000)
> f24            0        (raw 0x00000000)
> f25            0        (raw 0x00000000)
> f26            1.34701633       (raw 0x3fac6b08)
> f27            -1.45662792e+14  (raw 0xd7047ac3)
> f28            1.79828668       (raw 0x3fe62e42)
> f29            -1.66303904e+38  (raw 0xfefa39ef)
> f30            1.75     (raw 0x3fe00000)
> f31            0        (raw 0x00000000)
> y              0x0      0
> psr            0xfe401005       -29356027
> wim            0x0      0
> tbr            0x0      0
> pc             0x477f0  0x477f0 <x264_mb_analyse_inter_p8x8+252>
> npc            0x477f4  0x477f4 <x264_mb_analyse_inter_p8x8+256>
> fsr            0x821    2081
> csr            0x0      0
> d0             0.9999999925494194       (raw 0x3feffffffc000000)
> d2             97857    (raw 0x40f7e41000000000)
> d4             0.47243309020996094      (raw 0x3fde3c5800000000)
> d6             4503599627370496 (raw 0x4330000000000000)
> d8             -2.231756341646826e+307  (raw 0xffbfc800ffbff5b0)
> d10            1.9352601617211939e-310  (raw 0x000023a000001c88)
> d12            5.4552284372227338e-315  (raw 0x0000000041d00000)
> d14            2.1474836479999997e+18   (raw 0x43bdcd64ffffffff)
> d16            -14      (raw 0xc02c000000000000)
> d18            2147483647       (raw 0x41dfffffffc00000)
> d20            97856.52756690979        (raw 0x40f7e40870ea0000)
> d22            0.9785652756690979       (raw 0x3fef506820000000)
> d24            0        (raw 0x0000000000000000)
> d26            0.055504108664754102     (raw 0x3fac6b08d7047ac3)
> d28            0.69314718055994529      (raw 0x3fe62e42fefa39ef)
> d30            0.5      (raw 0x3fe0000000000000)
>
>
>
> I also checked the value of a, and it looks very odd:
>
> (gdb) print a
> $1 = (x264_mb_analysis_t *) 0x1
>
> mvc seems to be fine:
>
> (gdb) print mvc
> $2 = (int (*)[2]) 0xffbfd408
>
>
>
> So I made another run and had an eye on x264_mb_analyse_inter_p8x8 and
> the variable a:
>
> (gdb) break x264_mb_analyse_inter_p8x8
> Breakpoint 1 at 0x476fc: file encoder/analyse.c, line 1015.
> (gdb) r -o eledream.264 eledream_640x360_32.yuv
> [SNIP]
> Breakpoint 1, x264_mb_analyse_inter_p8x8 (h=0x389940, a=0xffbfd244)
>    at encoder/analyse.c:1015
> 1015        const int i_ref = a->l0.me16x16.i_ref;
> (gdb) watch a
> Watchpoint 2: a
> (gdb) print a
> $1 = (x264_mb_analysis_t *) 0xffbfd244
> (gdb) c
> Continuing.
> Watchpoint 2: a
>
> Old value = (x264_mb_analysis_t *) 0xffbfd244
> New value = (x264_mb_analysis_t *) 0x1
> 0x000a7fec in _PROCEDURE_LINKAGE_TABLE_ ()
> (gdb)
>
>
>
> Some googling revealed that the PLT is used to indirectly invoke
> functions from shared libs. The x264 binary on my system uses the
> following libs:
>
> ldd x264
>        libm.so.2 =>     /lib/libm.so.2
>        libpthread.so.1 =>       /lib/libpthread.so.1
>        libc.so.1 =>     /lib/libc.so.1
>        /platform/SUNW,Sun-Fire-T200/lib/libc_psr.so.1
>
>
> The whole thing is very odd - the error occurs between line 1015 (first
> reference of a, works fine) and line 1027 (the segfault). Unfortunately
> I couldn't find out anything else. :-(
>
>
>
> I furthermore get the following warnings when I compile x264, which
> might or might not be related:
>
> common/pixel.c: In function 'x264_pixel_ssim_wxh':
> common/pixel.c:382: warning: implicit declaration of function 'alloca'
> common/pixel.c:382: warning: incompatible implicit declaration of
> built-in function 'alloca'
>
> and the same warning again for encoder/me.c in function
> "x264_me_search_ref".
>
>
>
> I'd be happy to dig further, but I'd need some help here.
>
> - Chris
>
> P.S. I had to #define isfinite to get x264 to compile, see my earlier
> emails for a description.
>
> -- 
> This is the x264-devel mailing-list
> To unsubscribe, go to: http://developers.videolan.org/lists.html
>
>
> -- 
> Ce message a été vérifié par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a été trouvé.
> Message délivré par le serveur de messagerie de l'Université d'Evry.
>
>


More information about the x264-devel mailing list