❦ 26 mars 2016 08:33 +0100, Baptiste <[email protected]> :

>> When I use resolvers check in 1.6.3 haproxy, it is crashed with "Bus error".
>> pstack with core file shows me:
>>
>> 000a6d1c dns_build_query (11f921, 1c, 16a650, 21, 11f8f0, 1238f0) + a8
>> 000a6d58 dns_send_query (16a698, 10be18, 0, 13ac90, 0, 8f1b) + 24
>> 00048f28 trigger_resolution (169db8, 16a698, 13acc8, 65, 8f1b, 8f1b) + c0
>> 0004d4bc process_chk (12f8a8, 80000003, 116800, 10c000, 1, 16a1a8) + 28c
>> 00022dbc process_runnable_tasks (10c0d4, 92ffc, 10c000, 10c000, 10c0e4, 0) +
>> 174
>> 00019354 run_poll_loop (10c000, 116800, 10c000, 10be2c, 11cbf0, 116968) + c8
>> 000159d0 main     (4, ffbffba4, ffffffff, 106704, 10bc00, 10bc00) + 618
>> 00016468 _start   (4, ffbffba4, ffbffbb8, ffbffcbb, ffffffff, 1e) + 5c
>
> Hi
>
> Can't you provide more information?
> I have no access to sparc machines, so it will be complicated to
> reproduce the problem.
>
> Could it be related to an endianess mismatch ?

A bus error on Sparc is more likely an alignment problem. You cannot
reproduce with QEMU since, AFAIK, it doesn't emulate this
behavior. Moreover, Linux doesn't offer anything to catch alignment
errors.

Looking at the code, the alignment of qinfo is dependent of the size of
the hostname. Therefore, it should be easy to test: Александр, keep only
one hostname in your configuration and add 1 character to it. Does it
still crash? The fix would be to take struct dns_question on the stack
and copy it with memcpy.
-- 
Let the data structure the program.
            - The Elements of Programming Style (Kernighan & Plauger)

Reply via email to