Walkingmind / embox

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

tinypy failed #711

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. tinypy fib.py

What is the expected output? What do you see instead?
 ASSERTION FAILED on CPU 0
    at src/mem/heap/mspace_malloc.c:80
    in function mspace_memalign

__next_at_line_80

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

 47 0x001c045b <__assertion_handle_failure+0xf6> ...pat/libc/assert/assert.c:45
 46 0x0017ccca <mspace_memalign+0x102>          src/mem/heap/mspace_malloc.c:64
 45 0x0017ce0c <mspace_malloc+0x31>            src/mem/heap/mspace_malloc.c:109
 44 0x0017cfa0 <mspace_calloc+0x54>            src/mem/heap/mspace_malloc.c:162
 43 0x001129c8 <calloc+0x2d>                           src/mem/heap/malloc.c:93
 42 0x0018c12c <tp_fnc_new+0x2d>                   third-party/tinypy/misc.c:15
 41 0x0018f2f1 <_tp_lookup_+0x1d0>            third-party/tinypy/builtins.c:196
 40 0x0018f362 <_tp_lookup+0x47>              third-party/tinypy/builtins.c:214
 39 0x0018f69a <tp_object_new+0x109>          third-party/tinypy/builtins.c:273
 38 0x0018c084 <_tp_dcall+0x15>                     third-party/tinypy/misc.c:5
 37 0x0018c0ef <_tp_tcall+0x61>                     third-party/tinypy/misc.c:8
 36 0x0019376d <tp_call+0x227>                      third-party/tinypy/vm.c:154
 35 0x0019365d <tp_call+0x117>                      third-party/tinypy/vm.c:154
 34 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 33 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 32 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 31 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 30 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 29 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 28 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 27 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 26 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 25 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 24 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 23 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 22 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 21 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 20 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 19 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 18 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 17 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 16 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 15 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 14 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
 13 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
 12 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
 11 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
 10 0x00195052 <tp_step+0x15b6>                     third-party/tinypy/vm.c:232
  9 0x001956a6 <_tp_run+0x5b>                       third-party/tinypy/vm.c:368
  8 0x001956f3 <tp_run+0x2e>                        third-party/tinypy/vm.c:374
  7 0x001938e8 <tp_call+0x3a2>                      third-party/tinypy/vm.c:154
  6 0x0019581e <tp_ez_call+0x10b>                   third-party/tinypy/vm.c:382
  5 0x00130d55 <exec+0xc3>                        src/cmds/language/tinypy.c:22
  4 0x0018a12d <cmd_exec+0x50>                      src/framework/cmd/core.c:23
  3 0x001213d7 <run_cmd+0x5c>                         src/cmds/shell/tish.c:159
  2 0x0010f8d4 <task_trampoline+0x1d>                src/kernel/task/multi.c:42
  1 0x00110790 <thread_trampoline+0xb3>             src/kernel/thread/core.c:58

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

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

 17 0x001113ac <thread_switch+0x46>        src/kernel/thread/thread_switch.c:37
 16 0x00172f97 <__schedule+0xa8>                   src/kernel/sched/sched.c:355
 15 0x00172fdc <schedule+0x15>                     src/kernel/sched/sched.c:396
 14 0x0017c6cc <sched_wait+0xb>        src/kernel/thread/thread_sched_wait.c:34
 13 0x0017c710 <sched_wait_timeout+0x19> ...ernel/thread/thread_sched_wait.c:64
 12 0x00181648 <task_waitpid_posix+0xbc>    src/kernel/task/syslib/waitpid.c:49
 11 0x001d0b9a <waitpid+0x17>                src/compat/posix/proc/waitpid.c:13
 10 0x0012147f <process_external+0x59>                src/cmds/shell/tish.c:181
  9 0x00121657 <tish_exec+0x88>                       src/cmds/shell/tish.c:235
  8 0x00121905 <tish_run+0xa6>                        src/cmds/shell/tish.c:326
  7 0x001219aa <shell_run+0x2c>                      src/include/cmd/shell.h:31
  6 0x00121abe <run_script+0xd6>                     src/init/start_script.c:26
  5 0x001414db <unit_mod_enable+0x57>                   src/framework/unit.c:25
  4 0x001419a9 <mod_enable+0x81>                   src/framework/mod/core.c:146
  3 0x001413da <runlevel_set+0xa1>                  src/framework/runlevel.c:54
  2 0x00100356 <init+0x28>                                 src/kernel/init.c:51
  1 0x00100310 <kernel_start+0x10>                         src/kernel/init.c:23

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

 --   02000000       W  thread 2  task 1 --------------------------------------

  5 0x001113ac <thread_switch+0x46>        src/kernel/thread/thread_switch.c:37
  4 0x00172f97 <__schedule+0xa8>                   src/kernel/sched/sched.c:355
  3 0x00172fdc <schedule+0x15>                     src/kernel/sched/sched.c:396
  2 0x00110d91 <thread_exit+0xc2>                  src/kernel/thread/core.c:259
  1 0x001107a1 <thread_priority_by_flags+0x0>       src/kernel/thread/core.c:74

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

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

  8 0x001113ac <thread_switch+0x46>        src/kernel/thread/thread_switch.c:37
  7 0x00172f97 <__schedule+0xa8>                   src/kernel/sched/sched.c:355
  6 0x00172ffb <sched_preempt+0x15>                src/kernel/sched/sched.c:403
  5 0x001122a9 <critical_dispatch_pending+0x5d>        src/kernel/critical.c:21
  4 0x00100275 <irq_handler+0x85>          src/arch/x86/kernel/irq_handler.c:20
  3 0x0010004c <_traps_text_start+0x1c>      src/arch/x86/kernel/irq_entry.S:34
  2 0x00100c8a <arch_idle+0x4>                    src/arch/x86/kernel/arch.c:24
  1 0x00110790 <thread_trampoline+0xb3>             src/kernel/thread/core.c:58

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

Please use labels and text to provide additional information.

Original issue reported on code.google.com by sikmir on 29 Nov 2014 at 11:10

GoogleCodeExporter commented 9 years ago

Original comment by sikmir on 29 Nov 2014 at 11:12

GoogleCodeExporter commented 9 years ago
tinypy itself is fine, the problem is in stack size.
problem could be fixed by changing mods.conf as follows:
@Runlevel(2) include embox.kernel.thread.core(thread_stack_size=65536)

Currently it is impossible to specify acceptable range of parameters from 
another module in my-file (like "depends thread.core(stack_size>=65536)").
However, this feature could be implemented in the next version of Mybuild, 
corresponding issue will be created.

Original comment by deryugin...@gmail.com on 12 Dec 2014 at 12:41