Minix 3.3.0 adding new server causing panic after reboot

325 views
Skip to first unread message

Nebojsa Sapic

unread,
Sep 7, 2016, 2:04:19 PM9/7/16
to minix3
Hi,

I have minix 3.3.0, and want to create new server, like ds.
Let's say my new server called BS

I do next steps :

1. PATH : /usr/src/minix/servers
cp -r ds bs

2. PATH: /usr/src/minix/servers/bs/Makefile
PROG= bs

3. PATH /usr/src/minix/servers/Makefile
SUBDIR+= ds input pm rs sched vfs vm bs

4. PATH /usr/src/minix/kernel/table.c
{PFS_PROC_NR, "pfs" },
{BS_PROC_NR, "bs" },
{INIT_PROC_NR, "init" },

5. PATH /usr/src/minix/include/minix/com.h
#define PFS_PROC_NR ((endpoint_t) 9)
#define BS_PROC_NR ((endpoint_t) 10)
#define LAST_SPECIAL_PROC_NR 11

6. PATH /usr/src/minix/servers/rs/table.c
{PFS_PROC_NR, "pfs", SRV_F },
{BS_PROC_NR, "bs", SRV_F },
{INIT_PROC_NR, "init", USR_F },

7. PATH /usr/src/releasetools/Makefile
PROGRAMS+= ${PROGROOT}/minix/fs/pfs/pfs
PROGRAMS+= ${PROGROOT}/minix/servers/bs/bs
PROGRAMS+= ${PROGROOT}/sbin/init/init

8. PATH /usr/src/releasetools
make hdboot

than reboot from root

After reboot, there is error :
Started VFS: 9 worker thread(s)
rs(2): panic: unable to get pid: -3
syslib:panic.c: stacktrace: 0x8051e4f 0x8049248 0x8051425 0x805176a 0x80487ec 0x8048273 0x8048198
          rs 2          0xf1001339 0x8051fc7 0x8051c60 0x80519ab 0x8051e60 0x8049248 0x8051425 0x805176a 0x80487ec 0x8048273 0x8048198
kernel panic: cause_sig: sig manager 2 gets lethal signal 6 for itself
kernel on CPU 0: 0xf042abcc 0xf042a099 0xf042b29c 0xf0420dcf 0xf0429d5e 0xf0419d85

System has panicked, press any key to reboot

Can you please tell me, what is wrong here, or what I have to do, to fix this, which file to edit etc..
Thank you!

Sambuc Lionel

unread,
Sep 7, 2016, 4:59:32 PM9/7/16
to MINIX3 Google Group
Did you simply replace:
#define MFS_PROC_NR ((endpoint_t) 10) /* minix root filesystem */
with
#define BS_PROC_NR ((endpoint_t) 10)
?

If so, you basically replaced the server providing the root filesystem needed for the system to boot, with your service.

You need to *add* your service, or your service has to provide a root filesystem for the system continue to boot. Or you need to modify init not to expect a ramdisk to be available.

Kind regards,

Lionel
> --
> You received this message because you are subscribed to the Google Groups "minix3" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Nebojsa Sapic

unread,
Sep 7, 2016, 5:11:35 PM9/7/16
to minix3
This is default minix 3.30
....
#define MFS_PROC_NR ((endpoint_t) 7) /* minix root filesystem */
#define VM_PROC_NR ((endpoint_t) 8) /* memory server */
#define PFS_PROC_NR ((endpoint_t) 9) /* pipe filesystem */
#define LAST_SPECIAL_PROC_NR 10
...

I changed it to this.
...
#define MFS_PROC_NR ((endpoint_t) 7) /* minix root filesystem */
#define VM_PROC_NR ((endpoint_t) 8) /* memory server */
#define PFS_PROC_NR ((endpoint_t) 9) /* pipe filesystem */
#define BS_PROC_NR ((endpoint_t) 10)
#define LAST_SPECIAL_PROC_NR 11
...

Antoine LECA

unread,
Sep 8, 2016, 4:18:36 AM9/8/16
to min...@googlegroups.com
On 07/09/2016 17:58Z, Nebojsa Sapic wrote:
> *After reboot, there is error :*
> Started VFS: 9 worker thread(s)
> rs(2): panic: unable to get pid: -3
> syslib:panic.c: stacktrace: 0x8051e4f 0x8049248 0x8051425 0x805176a
> 0x80487ec 0x8048273 0x8048198
> rs 2 0xf1001339 0x8051fc7 0x8051c60 0x80519ab 0x8051e60

Seems you got an error in RS; this implies the kernel booted OK (meaning
your setup with kernel/table.c and the like is OK).

You can try to add
rs_verbose=1
to the boot.cfg menu command (use the [edit] option to do it once): this
emits a number of debug message about what is doing RS; also using the
serial console is useful to keep traces (particularly if using virtual
machines). You should learn to use it with an unmodified system, since
it is a bit cryptic; then re-adds your changes.

Otherwise, the stacktrace can be decoded with
$ addr2line -fe path/to/binary/rs 0x8051e4f 0x8049248 ...
This helps to figure out what is failing.


Antoine

Nebojsa Sapic

unread,
Sep 8, 2016, 7:19:07 AM9/8/16
to minix3
First, thank you for the ansfer,

I edit boot.cfg.default and put this
rs_verbose=1

After that, I makehdboot and reboot. But same error apeared :/

Greg Reagle

unread,
Sep 8, 2016, 7:32:36 AM9/8/16
to min...@googlegroups.com
Making the reincarnation server more verbose is not going to fix the problem.  It's going to give you more log information, which you can then look at to try to figure out what is going on.

Nebojsa Sapic

unread,
Sep 8, 2016, 7:36:49 AM9/8/16
to minix3
Thank you for response.
I know, but I realise, information will be given on reboot. But same error printed. Like i wrote in first post.
Reply all
Reply to author
Forward
0 new messages