kayws426 / embox

Automatically exported from code.google.com/p/embox
0 stars 1 forks source link

netstat crashes the system #710

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. config: x86/nonvga_debug
2. run autoqemu
3. run netstat

What is the expected output? What do you see instead?

root@embox:/#netstat
Active Internet connections
Proto   Local Address   Foreign Address   State

tcp          127.0.0.1:1024  127.0.0.1:1025 

  ______
 |  ____|                                            __          __
 | |___  _ __ ___            ____  ____  ____  _____/ /   _____ / /
 |  ___|| '_ ` _ \          / __ \/ __ \/ __ \/ ___/ /   |_____| |
 | |____| | | | | |_ _ _   / /_/ / /_/ / /_/ (__  )_/    |_____| |
 |______|_| |_| |_(_|_|_)  \____/\____/ .___/____(_)           | |
                                     /_/                        \_\
 ASSERTION FAILED on CPU 0
    at src/cmds/net/netstat.c:56
    in function tcp_sock_state_str

0

    (illegal tcp socket state -19735445)

 --   01000000 * A R    thread 298  task 2 ------------------------------------

  9 0x001b8299 <__assertion_handle_failure+0xfc> ...pat/libc/assert/assert.c:45
  8 0x00125fcf <tcp_sock_state_str+0x97>              src/cmds/net/netstat.c:39
  7 0x00126199 <print_inet_sock_info+0x1c8>           src/cmds/net/netstat.c:60
  6 0x00126213 <print_info+0x43>                     src/cmds/net/netstat.c:100
  5 0x0012627d <exec+0x23>                           src/cmds/net/netstat.c:116
  4 0x00196e7d <cmd_exec+0x4d>                      src/framework/cmd/core.c:23
  3 0x00125391 <run_cmd+0x63>                         src/cmds/shell/tish.c:159
  2 0x00114042 <task_trampoline+0x1c>                src/kernel/task/multi.c:42
  1 0x00110674 <thread_trampoline+0xa9>             src/kernel/thread/core.c:58

run 0x00114026 <task_trampoline+0x0>                 src/kernel/task/multi.c:42

 --   01000000       W  thread 0  task 1 --------------------------------------

 17 0x00111241 <thread_switch+0x45>        src/kernel/thread/thread_switch.c:36
 16 0x00185117 <__schedule+0xa3>                   src/kernel/sched/sched.c:355
 15 0x00185156 <schedule+0x17>                     src/kernel/sched/sched.c:397
 14 0x001842ac <sched_wait+0xb>        src/kernel/thread/thread_sched_wait.c:34
 13 0x001842ec <sched_wait_timeout+0x19> ...ernel/thread/thread_sched_wait.c:64
 12 0x00186c23 <task_waitpid_posix+0xb8>    src/kernel/task/syslib/waitpid.c:49
 11 0x001c2bbb <waitpid+0x1f>                src/compat/posix/proc/waitpid.c:13
 10 0x00125447 <process_external+0x65>                src/cmds/shell/tish.c:181
  9 0x0012562e <tish_exec+0x7e>                       src/cmds/shell/tish.c:235
  8 0x0012590b <tish_run+0xa6>                        src/cmds/shell/tish.c:326
  7 0x001259b0 <shell_run+0x2c>                      src/include/cmd/shell.h:31
  6 0x00125aab <run_script+0xc0>                     src/init/start_script.c:26
  5 0x0014999e <unit_mod_enable+0x59>                   src/framework/unit.c:25
  4 0x00149e4f <mod_enable+0x79>                   src/framework/mod/core.c:146
  3 0x001498a7 <runlevel_set+0x97>                  src/framework/runlevel.c:54
  2 0x001000ff <init+0x24>                                 src/kernel/init.c:51
  1 0x001000bd <kernel_start+0x10>                         src/kernel/init.c:23

run 0x001845b1 <boot_stub+0x0>                src/kernel/sched/sched_start.c:29

 --   02000000       W  thread 5  task 1 --------------------------------------

  5 0x00111241 <thread_switch+0x45>        src/kernel/thread/thread_switch.c:36
  4 0x00185117 <__schedule+0xa3>                   src/kernel/sched/sched.c:355
  3 0x00185156 <schedule+0x17>                     src/kernel/sched/sched.c:397
  2 0x00110c80 <thread_exit+0xb7>                  src/kernel/thread/core.c:262
  1 0x00110682 <thread_priority_by_flags+0x0>       src/kernel/thread/core.c:74

run 0x00115644 <handler_timeout+0x0>            src/tests/posix/sleep_test.c:40

 --   01000000     R    thread 1  task 1 --------------------------------------

  8 0x00111241 <thread_switch+0x45>        src/kernel/thread/thread_switch.c:36
  7 0x00185117 <__schedule+0xa3>                   src/kernel/sched/sched.c:355
  6 0x00185174 <sched_preempt+0x17>                src/kernel/sched/sched.c:404
  5 0x0014927e <critical_dispatch_pending+0x5c>        src/kernel/critical.c:21
  4 0x00100c60 <irq_handler+0x76>          src/arch/x86/kernel/irq_handler.c:20
  3 0x0010004c <irq_stub+0x1c>               src/arch/x86/kernel/irq_entry.S:34
  2 0x00100d0e <arch_idle+0x4>                    src/arch/x86/kernel/arch.c:24
  1 0x00110674 <thread_trampoline+0xa9>             src/kernel/thread/core.c:58

run 0x00184634 <idle_run+0x0>                 src/kernel/sched/sched_start.c:74

Please use labels and text to provide additional information.

Original issue reported on code.google.com by deryugin...@gmail.com on 7 Oct 2014 at 2:27

GoogleCodeExporter commented 9 years ago

Original comment by deryugin...@gmail.com on 27 Oct 2014 at 2:23