Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ Running the server ➜ problems running with raspios

problems running with raspios

Posting of new messages is disabled at present.

Refresh page


Posted by Sorhen   (5 posts)  Bio
Date Sat 29 Aug 2020 02:59 PM (UTC)
Message
Hi everyone. I'm trying to run smaugfuss, last version, on a raspberry pi4 with raspios, the new substitute of Raspbian. When I run the server, cd smaugfuss/area; ../src/startup 4000, and then try to connect with telnet 127.0.0.1 4000, it works. But, in the moment I insert username, and after that password, when I press enter after password input it crashes.
I'm going to post gdb output.
gdb src/smaug area/core
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from src/smaug...done.
[New LWP 3198]
Core was generated by `../src/smaug'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __GI___libc_free (mem=0x55b6425f7000) at malloc.c:3093
3093 malloc.c: No such file or directory.

(gdb) quit
Thanks everyone for help.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 30 Aug 2020 03:54 AM (UTC)
Message

I’m trying to run smaugfuss, last version …

Can you be more specific? “Latest version” could be anything, depending on which web site you got it from. Please provide the filename you used and a link to where it came from.

I think https://github.com/Arthmoor/SmaugFUSS may be the latest version, according to the link at https://smaugmuds.afkmods.com/.

I seem to recall a problem with crashes, in an earlier version, due to it not handling telnet negotiation/subnegotiation.

As for debugging, please see my post at http://www.gammon.com.au/gdb. That describes techniques for using gdb to track down crashes. Typing “quit” doesn’t tell you much, not much point in using gdb to do that. Make sure you compile with debugging information (see that link) and then when it crashes type “bt” (backtrace) and at least post what you see there.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sorhen   (5 posts)  Bio
Date Reply #2 on Sun 30 Aug 2020 06:00 PM (UTC)
Message
hi! yes! I got the source from that links. It is 1.9.4. I've compiled it following the gdb guide, and, making a bt in gdb the output is:
(gdb) bt
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
(gdb)
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
(gdb)
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
I hope that this is enough to understand the problems for you that know all much better than me!
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #3 on Sun 30 Aug 2020 06:37 PM (UTC)

Amended on Sun 30 Aug 2020 06:43 PM (UTC) by Fiendish

Message
How many bytes long is your title file?
Inspect the value of "num" right before the error occurs.
This unsafe code doesn't prevent you from writing past the end of BUFF.

It should be checking the size of the file and allocating an appropriately sized buffer to receive the contents instead of allocating only a fixed amount of space regardless of what file is being read in.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Sorhen   (5 posts)  Bio
Date Reply #4 on Sun 30 Aug 2020 06:42 PM (UTC)

Amended on Sun 30 Aug 2020 06:48 PM (UTC) by Sorhen

Message
Fiendish said:

How many bytes long is your title file?
Inspect the value of "num" right before the error occurs.
This unsafe code doesn't prevent you from writing past the end of BUFF.

Consider that I've not edited code. I just downloaded, edited makefile to compile for debugging and compiled! So, is the default one.
the file smaugfuss/system/mudtitle.ans, says 166b
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 31 Aug 2020 05:01 AM (UTC)
Message
Just to allow for the buffer overflow, change:


      while( ( BUFF[num] = fgetc( rpfile ) ) != EOF )


to:



      while( ( BUFF[num] = fgetc( rpfile ) ) != EOF &&
            num < (MAX_STRING_LENGTH * 2 - 1 ) )


MAX_STRING_LENGTH is quite large (4096) - I presume you have lots of RAM? And that the architecture supports large local variables?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sorhen   (5 posts)  Bio
Date Reply #6 on Mon 31 Aug 2020 01:24 PM (UTC)
Message
Nick Gammon said:

Just to allow for the buffer overflow, change:


      while( ( BUFF[num] = fgetc( rpfile ) ) != EOF )


to:



      while( ( BUFF[num] = fgetc( rpfile ) ) != EOF &&
            num < (MAX_STRING_LENGTH * 2 - 1 ) )


MAX_STRING_LENGTH is quite large (4096) - I presume you have lots of RAM? And that the architecture supports large local variables?

yes! It's the raspberry pi4 module with 8 gb ram. I'm mounting the beta of 64bit raspios.
But, excuse! Where is the code to edit? I've not found!
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #7 on Mon 31 Aug 2020 08:44 PM (UTC)
Message

I didn’t make that totally clear. In the backtrace you posted was:

 #4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497

The line of code in question is at line 2497 in act_comm.c (which is in the src folder). On Github it is:

https://github.com/Arthmoor/SmaugFUSS/blob/master/src/act_comm.c#L2497


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sorhen   (5 posts)  Bio
Date Reply #8 on Mon 31 Aug 2020 09:04 PM (UTC)
Message
Nick Gammon said:

I didn't make that totally clear. In the backtrace you posted was:

```
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
```

The line of code in question is at line 2497 in act_comm.c (which is in the src folder). On Github it is:

<https://github.com/Arthmoor/SmaugFUSS/blob/master/src/act_comm.c#L2497>

Seems it works! Thank you!
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #9 on Thu 10 Sep 2020 04:25 PM (UTC)
Message
The underlying problem appears to be https://www.raspberrypi.org/forums/viewtopic.php?t=217769

Smaugfuss is not compatible with ARM as long as it uses fgetc like this.

https://github.com/fiendish/aardwolfclientpackage
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


24,376 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.