Bug 266866 - net-p2p/amule: Executable segfaults after launch/Update rc script
Summary: net-p2p/amule: Executable segfaults after launch/Update rc script
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-06 13:54 UTC by Francesco
Modified: 2023-07-23 09:55 UTC (History)
12 users (show)

See Also:


Attachments
Updated rc file for amuled (1.52 KB, text/plain)
2023-03-26 03:34 UTC, echoxxzz
no flags Details
Updated rc file for amuled (970 bytes, patch)
2023-03-26 17:26 UTC, echoxxzz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco 2022-10-06 13:54:01 UTC
As per summary, the executable crashes with segmentation fault as soon as it starts.
The package is installed via pkg and the issue affects both net-p2p/amule-2.3.3_4 and net-p2p/amule-devel-11065_3.

To reproduce:
I have been able to reproduce the issue on 3 different FreeBSD machines (all version 13.1-RELEASE-p2), in both jailed and non-jailed environment.
1) # pkg install amule
2) $ amuled
Segmentation fault (core dumped)

Additional informations:
The crash occurs immediately, before trying to access or create configuration file. Happens even if I try just to print the help with "amuled -h", or to show the version as well.
I can provide the amuled.core dump file, if needed.

Thank you for your help :)
Comment 1 35gh 2022-10-08 15:37:36 UTC
Same here. amuled port is working well in 12.3-RELEASE-p7.
Comment 2 Lars Henrik Ørn 2022-10-10 07:09:47 UTC
Hi

Also happens for me. I am on quarterly ports r2022Q4
Comment 3 35gh 2022-11-15 10:43:49 UTC
Hi,

I would suggest to increase the importance, as this issue is most probably preventing the port to start for all users on FreeBSD 13.

Thanks!
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2022-12-05 12:04:56 UTC
Maintainer reset.
Comment 5 Rene Ladan freebsd_committer freebsd_triage 2022-12-31 01:36:21 UTC
Hmm, so this is about net-p2p/amule, not net-p2p/amule-devel which expired today?
Comment 6 Francesco 2022-12-31 07:08:16 UTC
(In reply to Rene Ladan from comment #5)
It affects both packages, but since amule-devel is deprecated, I think it's appropriate to edit the title.
Comment 7 Luciano Mannucci 2023-01-19 19:13:14 UTC
Same here, though I have freebsd 12.4-RELEASE.

If I launch gdb on the core I get:

Reading symbols from /usr/local/bin/amuled...
(No debugging symbols found in /usr/local/bin/amuled)
[New LWP 100121]
Core was generated by `amuled'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0  0x0000000800adb571 in ?? () from /usr/local/lib/libcryptopp.so.8
(gdb) bt
#0  0x0000000800adb571 in ?? () from /usr/local/lib/libcryptopp.so.8
#1  0x0000000800adc36f in CryptoPP::SHA256::HashMultipleBlocks(unsigned int const*, unsigned long) () from /usr/local/lib/libcryptopp.so.8
#2  0x0000000800a460af in CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::Update(unsigned char const*, unsigned long) () from /usr/local/lib/libcryptopp.so.8
#3  0x0000000800aabfd0 in CryptoPP::RandomPool::IncorporateEntropy(unsigned char const*, unsigned long) () from /usr/local/lib/libcryptopp.so.8
#4  0x0000000800a9573b in CryptoPP::AutoSeededRandomPool::Reseed(bool, unsigned int) () from /usr/local/lib/libcryptopp.so.8
#5  0x00000000004128c8 in ?? ()
#6  0x000000080043741d in ?? () from /libexec/ld-elf.so.1
#7  0x00007fffffffdcd8 in ?? ()
#8  0x00000008005d850c in ?? () from /lib/libelf.so.2
#9  0x000000000000004b in ?? ()
#10 0x00000008005d80c0 in ?? () from /lib/libelf.so.2
#11 0x00007fffffffdc30 in ?? ()
#12 0x000000080045dc00 in ?? ()
#13 0x00000008005d80c0 in ?? () from /lib/libelf.so.2
#14 0x00007fffffffdcd8 in ?? ()
#15 0x00007fffffffdcc0 in ?? ()
#16 0x0000000800439b95 in ?? () from /libexec/ld-elf.so.1
#17 0x0000000000000000 in ?? ()
(gdb) 

I might recompile with -O0 -g from the ports to see if it says
something useful once crashed...
 (my uname -a: FreeBSD mordeus 12.4-RELEASE FreeBSD 12.4-RELEASE r372781 GENERIC  amd64).
Comment 8 Luciano Mannucci 2023-01-20 17:55:16 UTC
recompiled from port, it gives the very same result using default compiler (clang). By compiling with g++, the linker gives me a lot of errors on undefined references in CryptoPP objects. Here are some of them:


/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x138): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x148): undefined reference to `CryptoPP::BufferedTransformation::ChannelPutModifiable2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned long, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x150): undefined reference to `CryptoPP::BufferedTransformation::ChannelFlush(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP10FileSourceE[_ZTVN8CryptoPP10FileSourceE]+0x160): undefined reference to `CryptoPP::BufferedTransformation::SetRetrievalChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x138): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x148): undefined reference to `CryptoPP::BufferedTransformation::ChannelPutModifiable2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned long, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x150): undefined reference to `CryptoPP::BufferedTransformation::ChannelFlush(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_9FileStoreEEE]+0x160): undefined reference to `CryptoPP::BufferedTransformation::SetRetrievalChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x138): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x148): undefined reference to `CryptoPP::BufferedTransformation::ChannelPutModifiable2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*, unsigned long, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x150): undefined reference to `CryptoPP::BufferedTransformation::ChannelFlush(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x160): undefined reference to `CryptoPP::BufferedTransformation::SetRetrievalChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/local/bin/ld: amule-ClientCreditsList.o:(.rodata._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x138): undefined reference to `CryptoPP::BufferedTransformation::ChannelCreatePutSpace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long&)'

It seems it doesn't like the crypto library...
Comment 9 echoxxzz 2023-03-23 18:47:16 UTC
I got it to stop core dumping. You need to enable the SIMD option in the security/cryptopp port and rebuild/reinstall cryptopp.
Comment 10 echoxxzz 2023-03-24 01:52:39 UTC
Now I  get new error message:

Assertion failed: ./src/common/selectdispatcher.cpp:ProcessSets:204: Assertion 'Assert failure' failed. NULL handler in wxSelectDispatcher?
Backtrace follows:
--== no BACKTRACE for your platform ==--

This only seems to happen after the switch to wxGTK 3.0.
Comment 11 echoxxzz 2023-03-24 18:13:49 UTC
After rebuilding amuled using wxGtk28 it's been rock solid. Right now this and enabling SIMD is the only solution to a working amuled.
Comment 12 echoxxzz 2023-03-26 03:34:08 UTC
Created attachment 241119 [details]
Updated rc file for amuled
Comment 13 echoxxzz 2023-03-26 03:35:20 UTC
I now have aMuled running using wxgtk30  on 13.1-p7 without any errors. I just had to build it using the boost libraries and make sure libcryptopp is built using SIMD.

So far no more core dumps or dispatcher errors.

I also fixed up the amuled rc file (see above) so it uses the amuled flags to fork and to create a pid file and to use the pid file to stop the deamon.

Since amuled has the ability to create it's own log file in your config directory there is no need for all the piping.
Comment 14 echoxxzz 2023-03-26 17:26:19 UTC
Created attachment 241128 [details]
Updated rc file for amuled

Here is a much better rc file that gets rid of the start/stop functions
Comment 15 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-09 17:30:53 UTC
Confirmed that amule only runs with security/cryptopp SIMD=ON.

I'm thinking in a way to solve this but it will be hard to enable SIMD by default because it can breaks with other archs.

I'm CC'ing cryptopp maintainer jhale@ to see if we can get help.
Comment 16 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-09 17:34:20 UTC
(In reply to Nuno Teixeira from comment #15)

(...)
Is there any specific clues why ctyptopp SIMD option solves crash?
Is there a possibility of patching amule without messing with cryptopp oprions?
Comment 17 Robert Clausecker freebsd_committer freebsd_triage 2023-04-19 12:37:56 UTC
See also bug #270916.
Comment 18 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-19 12:58:10 UTC
(In reply to Robert Clausecker from comment #17)

Hello Robert!

Thanks for link. From a quick view I noted:

---
The fix: add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as cryptopp-8.7.0 build with this option by default on i386 and amd64.
---

I will take a better look tomorrow and do build tests.

Thanks!
Comment 19 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-19 19:42:31 UTC
(In reply to Nuno Teixeira from comment #18)
(...)

Confirmed that is fixes core dump during start at 13.2-RELEASE
Comment 20 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-20 07:55:05 UTC
(In reply to Jeffery Telford from comment #12)

# service amuled onestart
/usr/local/etc/rc.d/amuled: WARNING: /home/amule/.aMule/amule.conf is not readable.
/usr/local/etc/rc.d/amuled: WARNING: failed precmd routine for amuled
Comment 21 commit-hook freebsd_committer freebsd_triage 2023-04-20 10:00:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4baf754027807e1ad7966055d40a4c4eb75a5717

commit 4baf754027807e1ad7966055d40a4c4eb75a5717
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-04-20 09:44:49 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-04-20 10:00:28 +0000

    net-p2p/amule: Adopt/Fix segmentation fault

     - Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
       cryptopp-8.7.0 build with this option by default on i386 and amd64.
       (5a19c08: security/cryptopp: Update to 8.7.0)

    While I'm here:

     - Makefile cleanup: license file, formatting and remove conflicts
       install on expired net-p2p/amule-devel port.

    PR:             266866
    Reported by:    Francesco <francesco@magno.cc>
    MFH:            2023Q2

 net-p2p/amule/Makefile | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
Comment 22 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-20 10:13:14 UTC
Setting PR to open for "Update rc script" part.

With both scripts, `service amuled start` fails.
log:
---
2023-04-20 10:41:08: Initialising aMuleD 2.3.3 compiled with wxBase(GTK2) v3.0.5
 2023-04-20 10:41:08: Checking if there is an instance already running...
 2023-04-20 10:41:08: No other instances are running.
 2023-04-20 10:41:08: Creditfile loaded, 0 clients are known
!2023-04-20 10:41:08: External connections disabled due to empty password!
 2023-04-20 10:41:08: Created Server UDP-Socket at port 4665
 2023-04-20 10:41:08: ListenSocket: Ok.
 2023-04-20 10:41:08: Created Client UDP-Socket at port 4672
 2023-04-20 10:41:08: Loading server.met file: /home/USER/.aMule/server.met
!2023-04-20 10:41:08: 12 servers in server.met found
 2023-04-20 10:41:08: Loading temp files from /home/USER/.aMule/Temp.
 2023-04-20 10:41:08: Loading PartFile 1 of 2

--------------------------------------------------------------------------------
A fatal error has occurred and aMule has crashed.
Please assist us in fixing this problem by posting the backtrace below in our
'aMule Crashes' forum and include as much information as possible regarding the
circumstances of this crash. The forum is located here:
    http://forum.amule.org/index.php?board=67.0
If possible, please try to generate a real backtrace of this crash:
    http://wiki.amule.org/wiki/Backtraces

----------------------------=| BACKTRACE FOLLOWS: |=----------------------------
Current version is: aMuleD 2.3.3 compiled with wxBase(GTK2) v3.0.5
Running on: FreeBSD 13.2-RELEASE amd64

--== no BACKTRACE for your platform ==--
---

Also, aMuled user doesn't exist and port doesn't add that user.
Thinking in a pkg-message to instruct user to configure user on rc script.

Any sugestion is welcome
Thanks
Comment 23 commit-hook freebsd_committer freebsd_triage 2023-04-20 19:28:52 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2892e80c9a6b4714648c9a2ff5087e67992886bf

commit 2892e80c9a6b4714648c9a2ff5087e67992886bf
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-04-20 09:44:49 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-04-20 19:27:59 +0000

    net-p2p/amule: Adopt/Fix segmentation fault

     - Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
       cryptopp-8.7.0 build with this option by default on i386 and amd64.
       (5a19c08: security/cryptopp: Update to 8.7.0)

    While I'm here:

     - Makefile cleanup: license file, formatting and remove conflicts
       install on expired net-p2p/amule-devel port.

    PR:             266866
    Reported by:    Francesco <francesco@magno.cc>
    MFH:            2023Q2

    (cherry picked from commit 4baf754027807e1ad7966055d40a4c4eb75a5717)

 net-p2p/amule/Makefile | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
Comment 24 commit-hook freebsd_committer freebsd_triage 2023-06-03 10:17:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1044fe65f12a1885352cab5a155c3634ed4d0f02

commit 1044fe65f12a1885352cab5a155c3634ed4d0f02
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-06-03 10:14:14 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-06-03 10:14:14 +0000

    net-p2p/amule: Modernize rc script

    PR:             266866
    Reported by:    echoxxzz@gmail.com

 net-p2p/amule/Makefile        |  2 +-
 net-p2p/amule/files/amuled.in | 54 ++++++++-----------------------------------
 2 files changed, 11 insertions(+), 45 deletions(-)
Comment 25 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-03 10:18:37 UTC
(In reply to echoxxzz from comment #14)
Committed, thanks!
Comment 26 fantextrading 2023-06-18 18:26:55 UTC
(In reply to echoxxzz from comment #11)

Hello echoxxzz, can you explain how to compile amule using the wxGtk28. When I try the command make it takes automatically the wxGtk3.0. Thank you for your support
Comment 27 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-18 19:36:53 UTC
(In reply to fantextrading from comment #26)
Hello,

wxgtk28 is deprecated.

MOVED:
x11-toolkits/wxgtk28|x11-toolkits/wxgtk30|2022-12-31|Has expired: Upstream support ended, use wx 3.x

Cheers
Comment 28 fantextrading 2023-06-19 19:36:29 UTC
I've already tried to use the latest version of WX and unfortunately amule chashes after few seconds after I start it up. Could you give me some advice on how to make it work correctly on FreeBSD 13.1. I've alread tried to compile cruptopp with SIMD support but it doesn't remove the problem. Thank you
Comment 29 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-20 07:11:41 UTC
(In reply to fantextrading from comment #28)

What version are you running?
What pkg repository are you using?

Revision 5 fixes crash ( https://cgit.freebsd.org/ports/commit/?id=4baf754027807e1ad7966055d40a4c4eb75a5717 )

$ pkg -vv | grep -A2 Repositories
---
Repositories:
  FreeBSD: {
    url             : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest",
---
Maybe is time to MFC this one.
Comment 30 fantextrading 2023-06-20 12:06:14 UTC
 url             : "http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest",

2023-06-20 14:05:57: Initialising aMuleD 2.3.3 compiled with wxBase(GTK2) v3.0.5
Comment 31 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-20 13:45:32 UTC
Reopening, seg faulting again.
Comment 32 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-20 13:48:44 UTC
(In reply to fantextrading from comment #30)
Confirmed:

---
aMule 2.3.3 compiled with wxGTK2 v3.0.5
Running on: FreeBSD 13.2-STABLE amd64

--== no BACKTRACE for your platform ==--


--------------------------------------------------------------------------------
Abort (core dumped)
---

I will investigate if security/cryptopp has changed since "5a19c08: security/cryptopp: Update to 8.7.0".

Thanks for reporting.
Comment 33 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-20 13:56:12 UTC
(In reply to Nuno Teixeira from comment #32)
(...)

security/cryptopp didn't change SIMD... I'm lost.

Tomorrow I will mess and disable:

---
# Fix segmentation fault, PR 266866
# see also 5a19c08: security/cryptopp: Update to 8.7.0
.if ${ARCH} == i386 || ${ARCH} == amd64
CXXFLAGS+=      -DCRYPTOPP_DISABLE_ASM
.endif
---

Any help is welcome!
Comment 34 Lars Henrik Ørn 2023-06-20 14:57:22 UTC
(In reply to Nuno Teixeira from comment #33)
Hi

security_cryptopp_SET=SIMD not needed any more (was for some time ago). But you need net-p2p_amule_SET=BOOST, or enable boost in amules build config. It should solve your problem. Not long ago both thins was needed to sucess,

Have a nice day
Comment 35 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-20 19:33:22 UTC
(In reply to Lars Henrik Ørn from comment #34)

I've recompiled amule with boost option on:

aMule 2.3.3 compiled with wxGTK2 v3.0.5 and Boost 1.82 (OS: FreeBSD)

Same crash, any thoughts?
Comment 36 Lars Henrik Ørn 2023-06-20 19:50:00 UTC
(In reply to Nuno Teixeira from comment #35)
Hi again

Are all other build options on default (except Boost on). It works on my system (amd64).
Comment 37 fantextrading 2023-06-20 21:22:15 UTC
I confirm that the solution of Lars Henrik Ørn works well. 

I compiled amule with Boost library and it's ok! Thank you a lot

Kind regards
Comment 38 Nuno Teixeira freebsd_committer freebsd_triage 2023-06-21 06:50:37 UTC
Just installed amule-2.3.3_6 via pkg and run `amule -r` (Resets config to default values) and it runs ok. Running `amule` after it runs ok too.

I've tried this by pure luck and I still can't find an answer to it.

Please try the above solution without boost option.

I will keep PR open until we find the real cause.

Thanks
Comment 39 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-05 19:14:27 UTC
Closing it again.

Doing run tests for some time on 14 current with success.

Thanks all!
Comment 40 Federico Benini 2023-07-10 13:23:45 UTC
Hi all, I think I have the same problem. I recently installed the latest version of Truenas and installed aMule in jail 13.2-RELEASE-p1

After a few seconds from starting amule, the application crashes and I find countless of these messages in the log:


Assertion failed: ./src/common/selectdispatcher.cpp:ProcessSets:204: Assertion '
Backtrace follows:
--== no BACKTRACE for your platform ==--

Assertion failed: ./src/common/fdiodispatcher.cpp:ModifyFD:113: Assertion 'i !=
Backtrace follows:
--== no BACKTRACE for your platform ==--

From the messages it seems that the problem has been solved, unfortunately I'm not a freesb expert. Could you give me some more details to solve the problem?

Thanks
Comment 41 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-10 23:19:48 UTC
(In reply to Federico Benini from comment #40)
Could you try:
`amule -r` (Resets config to default values)?
Comment 42 Francesco 2023-07-18 16:18:21 UTC
(In reply to echoxxzz from comment #14)

I just want to signal a discrepancy in the rc.d file

the documentation says the default user is 'aMule'
# amuled_user (str): Set to user running amuled
#                    (default 'aMule')

but the actual default user is 'amule'
: ${amuled_user:="amule"}
Comment 43 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-19 19:37:05 UTC
(In reply to Francesco from comment #42)

Hello.
Spoted and fixing it tommorrow.

Thanks
Comment 44 Federico Benini 2023-07-20 08:52:28 UTC
(In reply to Nuno Teixeira from comment #41)

Hi, i have resolved with "make config" and selected the package "Boost". After install taht package i didn't have any more problem.
Comment 45 commit-hook freebsd_committer freebsd_triage 2023-07-20 10:42:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4d5b0df768a7696dc6aa8ebbd629c9e6c2ac3db1

commit 4d5b0df768a7696dc6aa8ebbd629c9e6c2ac3db1
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-07-20 10:38:59 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-07-20 10:41:47 +0000

    net-p2p/amule: Fix typo in rc script

    - Fix rc script amule user

    PR:             266866
    Reported by:    francesco@magno.cc

 net-p2p/amule/Makefile        | 2 +-
 net-p2p/amule/files/amuled.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 46 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-20 10:43:29 UTC
Committed.

Thank you Francesco!
Comment 47 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-20 10:46:20 UTC
(In reply to Federico Benini from comment #44)

Thanks for trying new options.
One of these days I will organize all the stuff in this PR and create a webpage so amule peeps can access.
WIP :)
Comment 48 Federico Benini 2023-07-20 10:55:12 UTC
(In reply to Nuno Teixeira from comment #47)

thank's for your job
Comment 49 35gh 2023-07-22 18:28:06 UTC
(In reply to Federico Benini from comment #44)

I had the same problem, aMule started to crash with the same error on FreeBSD 12.2 and newer. With Boost support enabled, it's rock stable on FreeBSD 13.2.

I suggest Boost config should be enabled by default.

Thanks!
Comment 50 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-22 23:17:38 UTC
(In reply to 35gh from comment #49)

Working on it.
Thanks
Comment 51 commit-hook freebsd_committer freebsd_triage 2023-07-23 09:55:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cffe8571bdc8fc28e72711e79cc545f817314b76

commit cffe8571bdc8fc28e72711e79cc545f817314b76
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-07-22 23:01:37 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-07-23 09:55:02 +0000

    net-p2p/amule: Turn BOOST option on by default

    - aMule users are experiencing stability improvments when compiling with BOOST

    PR:             266866

 net-p2p/amule/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)