On 1/18/22 13:57, Andrea Bolognani wrote:
> On Tue, Jan 18, 2022 at 12:30:30PM +0100, Michal Prívozník wrote:
>> On 1/18/22 11:14, Andrea Bolognani wrote:
>>> These changes seem to have made ASAN very unhappy, see
>>>
>>>
https://gitlab.com/MichalPrivoznik/libvirt/-/jobs/1985244739
>>>
https://gitlab.com/MichalPrivoznik/libvirt/-/jobs/1985244740
>>>
>>> Tim, do you have any idea why that would be the case? My uneducated
>>> guess is that the environment needed by ASAN is somehow lost when the
>>> dnsmasqmock.py script is called, but I'm unfamiliar with how these
>>> tools actually work.
>>
>> [...] I
>> could mock virFindFileInPath() just like I am now, except let it return
>> a predictable path (say /usr/sbin/dnsmasq) and then use
>> virFileWrapper...() to redirect /usr/sbin/ to abs_srcdir.
>>
>> Alternative to all of this is to keed virCommandSetDryRun() just like I
>> had in one of previous patches. Remind me please, what was the issue
>> with that?
>
> The Python script approach seemed simpler, but in light of this issue
> I guess that argument has gone completely out of the window :)
>
> Can you please try a version of this series with your original
> dnsmasq mocking approach in CI and see whether ASAN is happy with it?
> If so, we can just go ahead with that one.
>
Will do. Although, since virCommandRun() wouldn't actually execute
anything I don't expect ASAN to raise any issues. Meanwhile, I'm testing
the approach I've outlined:
https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/450382098
Let's see how it runs.
Aaand I have the results:
failed to create the fake capabilities: internal error: Child process
(LC_ALL=C
LD_PRELOAD=/builds/MichalPrivoznik/libvirt/build/tests/libvirdnsmasqmock.so
PATH=/builds/MichalPrivoznik/libvirt/build/tests:/usr/libexec/ccache-wrappers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOME=/bad-test-used-env-home /usr/local/sbin/dnsmasqmock.py --version)
unexpected exit status 127: /usr/bin/env: symbol lookup error:
/builds/MichalPrivoznik/libvirt/build/tests/../src/libvirt.so.0:
undefined symbol: __asan_option_detect_stack_use_after_return
Why does dnsmasqmock.py try to link with libvirt.so.0 or why there's a
missing symbol is beyond me. So let me just stick with what I suggested
initially.
Michal