2015-06-12 8:41 GMT+02:00 Willy Tarreau <[email protected]>:
> On Fri, Jun 12, 2015 at 08:35:15AM +0200, Willy Tarreau wrote:
>> On Fri, Jun 12, 2015 at 08:27:34AM +0200, joris dedieu wrote:
>> (...)
>> > All those one are innocents. Including sys/limits.h on common/compat.h
>> > correct  those differences and not the segfault.
>>
>> OK. Please use limits.h instead as sys/limits.h is not present on all
>> systems.
>>
>> I'm thinking about something else you can test, which is to verify all
>> objects sizes. You need to build with and without the patch, then you
>> can diff the outputs and check whether some structures would have a
>> different size. This could help spot the culprit :
>>
>>  $ find . -name '*.o' | sort | xargs nm --size-sort
>
> When doing this here, I found something troubling :
>
> (joris.out is your version with the revert)
>
> --- normal.out  2015-06-12 08:37:00.828256778 +0200
> +++ joris.out   2015-06-12 08:36:41.509255648 +0200
> @@ -91,6 +91,7 @@
>
>  ./src/auth.o:
>  00000004 B userlist
> +00000006 C localtimezone
>  00000041 T auth_find_userlist
>  00000050 T check_group
>  00000088 T check_user
> @@ -1002,7 +1003,7 @@
>  00000020 T tcp_req_cont_keywords_register
>  00000020 T tcp_res_cont_keywords_register
>  00000027 t port_range_release_port
> -00000028 r CSWTCH.124
> +00000028 r CSWTCH.122
>  00000039 t bind_parse_defer_accept
>  00000039 t bind_parse_transparent
>  00000039 T tcp_get_src
> @@ -1545,7 +1546,7 @@
>  00000008 C date
>  00000008 C now
>  00000008 C start_date
> -00000008 b tv_offset.4129
> +00000008 b tv_offset.3989
>  00000024 T _tv_isgt
>  00000024 T _tv_isle
>  0000002f T _tv_ms_elapsed
> @@ -1562,6 +1563,7 @@
>  0000023f T tv_update_date
>
>  ./src/uri_auth.o:
> +00000006 C localtimezone
>  0000001e T stats_set_flag
>  0000001e T stats_set_refresh
>  0000005a T stats_set_realm
>
> As you can see, "localtimezone" moves to another file. Guess what ?
> it's an array of 6 chars which is defined in standard.h ! That's
> completely bogus, I wonder where that comes from!
>
> I would not be surprized if you have a similarly named variable on
> FreeBSD which is of a smaller size and which gets overwritten when
> this variable is modified.
>
> Please could you try to rename it as a quick test ? It only appears
> at 3 locations :
>
> $ git grep -n localtimezone
> include/common/standard.h:827:char localtimezone[6];
> src/haproxy.c:588:      strftime(localtimezone, 6, "%z", &curtime);
> src/standard.c:2340:    memcpy(dst, localtimezone, 5); // timezone

Done and unfortunately it stills segfaulting. But despite Level3 high
quality route filtering near lunchtime, I think, I'm not too far. Has
you suggested I looked at nm output  and found things that make me
think on struct proxy size.

I found that there was a link with _COMMON_COMPAT_H defined or not and
finally with CONFIG_HAP_TRANSPARENT.
Commenting lines 101 to 108 on include/common/compat.h without other
modifications stop segfaulting. I will try to continue this way.

Best Regards
Joris
>
> Willy
>

Reply via email to