aMule Forum
English => en_Bugs => Topic started by: xtrondo on January 01, 2009, 07:19:41 PM
-
I used amule 2.2.x on Opensolaris/Solaris under UFS and generally was pretty stable, only get a few random crashes after have it running for several days non-stop, but since I change to a system using the amazing ZFS filesystem never get amule to work without crash after a few seconds since start, I know that Alfred from OpenSolaris Project made a few patches for Sun Studio compiler and push amule into SFE repository, but none covers this issue, last OpenSoralaris/Solaris nevada builds are full ZFS based so this render amule not to work on this platforms anymore , I can be wrong but I think the problem is when amule start scanning filesystem, for some reason, functions like "GetFilesystemType" returns something unexpected under ZFS, . I compile a version only with minimal requirements to produce the backtrace that is in "attach", I have several machines available for any tests , and I will be available to help on anything needed.
Kind Regards & Thanks.
Carlos Almeida,
-
I built aMule successfully under Solaris 10 U4 (will create packages Soon (TM)) and it works fine. However, I used included GCC to compile it. Have you tried that? it might make a difference.
Regards.
-
Have you tried it with ZFS, Skolnick ?
-
Have you tried it with ZFS, Skolnick ?
Hmmm...you are right Stu, it seems I read the post too quickly. No, my system is UFS only. However, i can create some ZFS volumes and test how my compiled binaries behave.
Regards.
-
...I used included GCC to compile it. Have you tried that? it might make a difference.
Did you check the backtrace? not seem to be a compiler issue, but yes I build the packages under OpenSolaris CBE with included gcc, and packages builded with Sunstudio 12 also produce same crash, notice that same packages under same system only using UFS doesn't crash.
Regards,
Carlos Almeida,
-
If you check the backtrace yourself, you'll see that the actual crash is inside libc, when aMule asks for the filesystem name.
-
If you check the backtrace yourself.
I think you get me wrong here..., when I ask if he check the backtrace, I ask to know if he find something that indicate what the problem could be, because I have no knowledge to chek it for myself, yes I look at it, but I can only make wild guesses.
-
But now I told you what I see. I wasn't trying to be confrontational, it was just a manner of speech.
-
Finally I managed to solve this issue, maybe is not related to ZFS itself, but to Solaris version, Solaris 11 builds and OpenSolaris will all crash with this problem when a file download is completed, I noticed that "Alfred" also report this, after the small patch everything work as expected, I have aMule on Opensolaris 2008.11 & Solaris 11 snv_105 running without any problems now, Im not that great producing patches so probably is not acceptable on configure part, I just posted here so anyone with this problem can also enjoy aMule, is a delight getting aMule running without problems on Solaris/OpenSolaris.
Thanks & Best Regards,
Carlos Almeida,
--- aMule-2.2.3.orig/acinclude.m4 2008-11-22 00:46:13.000000000 +0000
+++ aMule-2.2.3/acinclude.m4 2009-01-17 23:01:11.750522270 +0000
@@ -95,6 +95,10 @@
RESOLV_LIB="-lresolv -lnsl"
X11LIBS="-lX11"
LIBS="$LIBS -lrt"
+ AS_IF([test x"`uname -s`" = xSunOS && test 0`uname -r | cut -f 2 -d "."` -eq 11 ],
+ [
+ MULECPPFLAGS="-D__SOLARIS11__"
+ ],[])
;;
*netbsd*)
SYS=netbsd
diff -urN aMule-2.2.3.orig/src/PlatformSpecific.cpp aMule-2.2.3/src/PlatformSpecific.cpp
--- aMule-2.2.3.orig/src/PlatformSpecific.cpp 2008-07-29 12:27:11.000000000 +0100
+++ aMule-2.2.3/src/PlatformSpecific.cpp 2009-01-17 23:53:52.784163189 +0000
@@ -241,6 +241,19 @@
#endif
#include <common/StringFunctions.h>
+#ifdef __SOLARIS11__
+static struct mnttab *
+mygetmntent(FILE *f)
+{
+ static struct mnttab mt;
+ int status;
+
+ if ((status = getmntent(f, &mt)) == 0)
+ return (&mt);
+ return (NULL);
+ }
+#endif
+
static PlatformSpecific::EFSType doGetFilesystemType(const CPath& path)
{
struct mnttab *entry = NULL;
@@ -251,8 +264,11 @@
if (mnttab == NULL) {
return PlatformSpecific::fsOther;
}
-
+#ifdef __SOLARIS11__
+ while ((entry = mygetmntent(mnttab)) != NULL) {
+#else
while (getmntent(mnttab, entry) == 0) {
+#endif
if (entry->mnt_mountp) {
wxString dir = char2unicode(entry->mnt_mountp);
if (dir == path.GetRaw().Mid(0, dir.Length())) {