aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: amule 2.2.3 crash under Opensolaris/Solaris with ZFS  (Read 6341 times)

xtrondo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« 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,
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #1 on: January 01, 2009, 07:36:21 PM »

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.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #2 on: January 01, 2009, 09:34:40 PM »

Have you tried it with ZFS, Skolnick ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #3 on: January 02, 2009, 01:18:24 AM »

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.
Logged

xtrondo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #4 on: January 04, 2009, 01:52:32 AM »

...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,
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #5 on: January 04, 2009, 01:55:01 AM »

If you check the backtrace yourself, you'll see that the actual crash is inside libc, when aMule asks for the filesystem name.
Logged

xtrondo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #6 on: January 04, 2009, 02:50:41 PM »

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.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #7 on: January 04, 2009, 10:35:53 PM »

But now I told you what I see. I wasn't trying to be confrontational, it was just a manner of speech.
Logged

xtrondo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: amule 2.2.3 crash under Opensolaris/Solaris with ZFS
« Reply #8 on: January 18, 2009, 01:57:26 AM »


  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())) {


Logged