FileZilla Server built with LLVM-Mingw toolchain crashes with Segmentation fault

Moderator: Project members

Post Reply
Message
Author
catmark
500 Command not understood
Posts: 2
Joined: 2023-10-15 02:39

FileZilla Server built with LLVM-Mingw toolchain crashes with Segmentation fault

#1 Post by catmark » 2023-10-15 03:06

FileZilla Server 1.7.3 cross compiled on Linux with
LLVM-Mingw toolchain: https://github.com/mstorsjo/llvm-mingw/ ... _64.tar.xz

filezilla-server.exe and filezilla-server-gui.exe crash on starup.

GDB debug information

Code: Select all

(gdb) run
Starting program: C:\Users\cat\Downloads\filezilla_server_1.7.3_x64\bin\filezilla-server-gui.exe
[New Thread 2064.0x4338]
[New Thread 2064.0x2030]
[New Thread 2064.0x2908]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff613e53b7d in std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, fz::ftp::commander::command const&, 0ull, 0ull>(std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>&, std::__1::tuple<fz::ftp::commander::command const&>&, std::__1::__tuple_indices<0ull>, std::__1::__tuple_indices<0ull>)
    (this=0x5c16a0, __first_args=..., __second_args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/tuple:1775
(gdb) bt
#0  0x00007ff613e53b7d in std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, fz::ftp::commander::command const&, 0ull, 0ull>(std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>&, std::__1::tuple<fz::ftp::commander::command const&>&, std::__1::__tuple_indices<0ull>, std::__1::__tuple_indices<0ull>) (this=0x5c16a0, __first_args=..., __second_args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/tuple:1775
#1  0x00007ff613e53b01 in std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, fz::ftp::commander::command const&>(std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>, std::__1::tuple<fz::ftp::commander::command const&>) (this=0x5c16a0, __pc=..., __first_args=..., __second_args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/__utility/pair.h:257
#2  0x00007ff613e53ab5 in std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, void*> >::construct[abi:v15000]<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>, std::__1::tuple<fz::ftp::commander::command const&> >(std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>*, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>&&, std::__1::tuple<fz::ftp::commander::command const&>&&) (
    this=0x7ff61509ed20, __p=0x5c16a0, __args=..., __args=..., __args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/__memory/allocator.h:165
#3  0x00007ff613e53a50 in std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, void*> > >::construct[abi:v15000]<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>, std::__1::tuple<fz::ftp::commander::command const&>, void>(std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, void*> >&, std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command>*, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>&&, std::__1::tuple<fz::ftp::commander::command const&>&&) (__a=..., __p=0x5c16a0, __args=...,__args=..., __args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/__memory/allocator_traits.h:290
#4  0x00007ff613e539a9 in std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::__unordered_map_hasher<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, true>, std::__1::__unordered_map_equal<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command> > >::__construct_node_hash<std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>, std::__1::tuple<fz::ftp::commander::command const&> > (this=warning: (Internal error: pc 0x7ff61509ed10 in read in CU, but not in symtab.)
warning: (Error: pc 0x7ff61509ed10 in address map, but not in symtab.)
0x7ff61509ed10, __hash=848475733110257658, __f=..., __rest=..., __rest=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/__hash_table:2382
#5  0x00007ff613e53489 in std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::__unordered_map_hasher<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, true>, std::__1::__unordered_map_equal<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command> > >::__emplace_unique_key_args<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >&&>, std::__1::tuple<fz::ftp::commander::command const&> > (this=warning: (Internal error: pc 0x7ff61509ed10 in read in CU, but not in symtab.)
warning: (Error: pc 0x7ff61509ed10 in address map, but not in symtab.)
0x7ff61509ed10, __k=..., __args=...,
    __args=..., __args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/__hash_table:2013
#6  0x00007ff613e4c7cb in std::__1::unordered_map<std::__1::basic_string_view<char, std::__1::char_traits<char> >, fz::ftp::commander::command, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> > const, fz::ftp::commander::command> > >::try_emplace[abi:v15000]<fz::ftp::commander::command const&>(std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, fz::ftp::commander::command const&) (this=warning: (Internal error: pc 0x7ff61509ed10 in read in CU, but not in symtab.)
warning: (Error: pc 0x7ff61509ed10 in address map, but not in symtab.)
0x7ff61509ed10, __k=..., __args=...)
    at /home/runner/work/test/test/llvm-mingw/x86_64-w64-mingw32/include/c++/v1/unordered_map:1287
#7  0x00007ff613e46350 in __cxx_global_var_init.101(void) ()
    at ./../server/../filezilla/serialization/types/../../ftp/commander.hpp:205
#8  0x00007ff6143d5cc4 in __do_global_ctors () at ../crt/gccmain.c:44
#9  __main () at ../crt/gccmain.c:58
#10 0x00007ff613e013a9 in __tmainCRTStartup () at ../crt/crtexe.c:321
#11 0x00007ff613e01156 in WinMainCRTStartup () at ../crt/crtexe.c:176
LLDB debug information

Code: Select all

(lldb) target create ".\\Downloads\\filezilla_server_1.7.3_x64\\bin\\filezilla-server-gui.exe"
Current executable set to 'C:\Users\cat\Downloads\filezilla_server_1.7.3_x64\bin\filezilla-server-gui.exe' (x86_64).
(lldb) run
(lldb) Process 2620 launched: 'C:\Users\cat\Downloads\filezilla_server_1.7.3_x64\bin\filezilla-server-gui.exe' (x86_64)
Process 2620 stopped
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7ff613e53b7d: Access violation reading location 0x00000020
    frame #0: 0x00007ff613e53b7d filezilla-server-gui.exe`std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&, fz::ftp::commander::command const&, 0ull, 0ull>(this=0x000001b20501fee0, (null)=piecewise_construct_t @ 0x000000a218fdf870, __first_args=size=1, __second_args=size=1, (null)=__tuple_indices<0ULL> @ 0x000000a218fdf868, (null)=__tuple_indices<0ULL> @ 0x000000a218fdf860) at tuple:1775:7
(lldb) bt
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7ff613e53b7d: Access violation reading location 0x00000020
  * frame #0: 0x00007ff613e53b7d filezilla-server-gui.exe`std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&, fz::ftp::commander::command const&, 0ull, 0ull>(this=0x000001b20501fee0, (null)=piecewise_construct_t @ 0x000000a218fdf870, __first_args=size=1, __second_args=size=1, (null)=__tuple_indices<0ULL> @ 0x000000a218fdf868, (null)=__tuple_indices<0ULL> @ 0x000000a218fdf860) at tuple:1775:7
    frame #1: 0x00007ff613e53b01 filezilla-server-gui.exe`std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>::pair[abi:v15000]<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&, fz::ftp::commander::command const&>(this=0x000001b20501fee0, __pc=piecewise_construct_t @ 0x000000a218fdf8e0, __first_args=size=1, __second_args=size=1) at pair.h:257:11
    frame #2: 0x00007ff613e53ab5 filezilla-server-gui.exe`void std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>>::construct[abi:v15000]<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&>, std::__1::tuple<fz::ftp::commander::command const&>>(this=0x00007ff61509ed20, __p=0x000001b20501fee0, __args=0x00007ff61480ac50, __args=size=1, __args=size=1) at allocator.h:165:28
    frame #3: 0x00007ff613e53a50 filezilla-server-gui.exe`void std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>>>::construct[abi:v15000]<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&>, std::__1::tuple<fz::ftp::commander::command const&>, void>(__a=0x00007ff61509ed20, __p=0x000001b20501fee0, __args=0x00007ff61480ac50, __args=size=1, __args=size=1) at allocator_traits.h:290:13
    frame #4: 0x00007ff613e539a9 filezilla-server-gui.exe`std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>>>> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::__unordered_map_hasher<std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>>>::__construct_node_hash<std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&>, std::__1::tuple<fz::ftp::commander::command const&>>(this=0x00007ff61509ed10, __hash=848475733110257658, __f=0x00007ff61480ac50, __rest=size=1, __rest=size=1) at __hash_table:2382:5
    frame #5: 0x00007ff613e53489 filezilla-server-gui.exe`std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::__unordered_map_hasher<std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>>>::__emplace_unique_key_args<std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char>>&&>, std::__1::tuple<fz::ftp::commander::command const&>>(this=0x00007ff61509ed10, __k="XPWD", __args=0x00007ff61480ac50, __args=size=1, __args=size=1) at __hash_table:2013:29
    frame #6: 0x00007ff613e4c7cb filezilla-server-gui.exe`std::__1::pair<std::__1::__hash_map_iterator<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command>, void*>*>>, bool> std::__1::unordered_map<std::__1::basic_string_view<char, std::__1::char_traits<char>>, fz::ftp::commander::command, std::__1::hash<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::equal_to<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char>> const, fz::ftp::commander::command>>>::try_emplace[abi:v15000]<fz::ftp::commander::command const&>(this=0x00007ff61509ed10 size=0, __k="XPWD", __args=0x0000000000000020) at unordered_map:1287:25
    frame #7: 0x00007ff613e46350 filezilla-server-gui.exe`::__cxx_global_var_init.101() at commander.hpp:205:2
    frame #8: 0x00007ff6143d5cc4 filezilla-server-gui.exe`__main [inlined] __do_global_ctors at gccmain.c:44:7
    frame #9: 0x00007ff6143d5c7f filezilla-server-gui.exe`__main at gccmain.c:58:7
    frame #10: 0x00007ff613e013a9 filezilla-server-gui.exe`__tmainCRTStartup at crtexe.c:321:5
    frame #11: 0x00007ff613e01156 filezilla-server-gui.exe`WinMainCRTStartup at crtexe.c:176:9
    frame #12: 0x00007ffddf5f257d kernel32.dll`BaseThreadInitThunk + 29
    frame #13: 0x00007ffde096aa78 ntdll.dll`RtlUserThreadStart + 40

User avatar
botg
Site Admin
Posts: 35449
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla Server built with LLVM-Mingw toolchain crashes with Segmentation fault

#2 Post by botg » 2023-10-15 10:29

That pretty much looks like a bug in either the compiler or the standard library. Try updating your toolchain to a more recent version.

If you want to cross-compile FileZilla Server for Windows, we recommend always using the MinGW toolchain that's part of Debian stable.

catmark
500 Command not understood
Posts: 2
Joined: 2023-10-15 02:39

Re: FileZilla Server built with LLVM-Mingw toolchain crashes with Segmentation fault

#3 Post by catmark » 2023-12-11 14:05

The problem looks fixed with latest LLVM 17.0.6.

Post Reply