Walkingmind / embox

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

nfs on arm #694

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.update to r13736
2.apply patch
Index: templates/arm/qemu/mods.config
===================================================================
--- templates/arm/qemu/mods.config  (revision 13736)
+++ templates/arm/qemu/mods.config  (working copy)
@@ -1,77 +1,124 @@
 package genconfig

 configuration conf {
+   @Runlevel(0) include embox.arch.arm.cortexa8.kernel.arch
    @Runlevel(0) include embox.arch.arm.cortexa8.kernel.context
    @Runlevel(0) include embox.arch.arm.cortexa8.kernel.interrupt
-   @Runlevel(0) include embox.arch.arm.cortexa8.kernel.arch
    @Runlevel(0) include embox.arch.arm.cortexa8.kernel.locore
+   @Runlevel(0) include embox.arch.arm.cortexa8.kernel.mmu
    @Runlevel(0) include embox.arch.system(core_freq=48054841)

-   @Runlevel(0) include embox.kernel.stack(stack_size=4096)
+   @Runlevel(0) include embox.kernel.stack(stack_size=0x2000)
    @Runlevel(1) include embox.driver.serial.ns16550
    @Runlevel(1) include embox.driver.diag(impl="embox__driver__serial__ns16550")
    @Runlevel(1) include embox.driver.interrupt.omap3_intc
    @Runlevel(1) include embox.driver.clock.omap3_clk
+   @Runlevel(1) include embox.kernel.timer.sys_timer
    @Runlevel(1) include embox.driver.gpmc.omap3_gpmc
    @Runlevel(1) include embox.driver.gpio.omap3_gpio
    @Runlevel(1) include embox.driver.net.lan9118
-   @Runlevel(2) include embox.driver.net.loopback
-   @Runlevel(1) include embox.kernel.timer.sys_timer
+   @Runlevel(1) include embox.driver.net.loopback

+   @Runlevel(2) include embox.fs.node(fnode_quantity=1024)
+   @Runlevel(2) include embox.fs.driver.initfs
+   @Runlevel(2) include embox.fs.driver.nfs
+   @Runlevel(2) include embox.fs.driver.tmpfs
+   @Runlevel(2) include embox.fs.driver.ramfs
+   @Runlevel(2) include embox.fs.rootfs
+
    @Runlevel(1) include embox.kernel.timer.strategy.head_timer
    @Runlevel(1) include embox.kernel.irq
    @Runlevel(1) include embox.kernel.critical
    @Runlevel(1) include embox.kernel.timer.sleep

-   @Runlevel(1) include embox.kernel.thread.core(thread_pool_size=512)
+   @Runlevel(1) include embox.kernel.task.multi
+   @Runlevel(1) include embox.kernel.thread.core(thread_pool_size=512, 
thread_stack_size=0x2000)
    @Runlevel(1) include embox.kernel.sched.strategy.priority_based
-   
-   @Runlevel(2) include embox.kernel.task.multi
-   @Runlevel(2) include embox.kernel.stack(stack_size=0x20000)
-   
-   @Runlevel(1) include embox.kernel.thread.core(thread_pool_size=1024, 
thread_stack_size=0x4000)
-   
-   @Runlevel(2) include embox.fs.driver.initfs
-   @Runlevel(2) include embox.fs.rootfs
-   @Runlevel(2) include embox.fs.driver.devfs
-   @Runlevel(2) include embox.fs.node(fnode_quantity=512)

+   @Runlevel(2) include embox.cmd.shell
    @Runlevel(3) include embox.init.start_script
-   include embox.cmd.shell

    include embox.cmd.test
    include embox.cmd.help
+   include embox.cmd.mem
+   include embox.cmd.wmem
+   include embox.cmd.input_test

    include embox.cmd.sys.date
+   include embox.cmd.sys.export
    include embox.cmd.sys.version
-   include embox.cmd.fs.cat
-   include embox.cmd.fs.ls

    include embox.cmd.proc.thread
-   include embox.cmd.sys.export
-   
+
    include embox.cmd.net.arp
    include embox.cmd.net.arping
-   include embox.cmd.net.ping
    include embox.cmd.net.ifconfig
    include embox.cmd.net.route
+   include embox.cmd.net.ping
    include embox.cmd.net.telnetd
-   include embox.cmd.net.httpd
-   include embox.cmd.net.servd
+   include embox.cmd.net.speedtest

-   include embox.lib.Print(support_floating=0)
+   include embox.cmd.fs.cat
+   include embox.cmd.fs.cd
+   include embox.cmd.fs.pwd
+   include embox.cmd.fs.ls
+   include embox.cmd.fs.rm
+   include embox.cmd.fs.mount
+   include embox.cmd.fs.umount
+   include embox.cmd.fs.stat
+   include embox.cmd.fs.echo
+   include embox.cmd.fs.touch
+   include embox.cmd.fs.mkdir
+   include embox.cmd.fs.cp
+   include embox.cmd.fs.mv
+
+   include embox.cmd.user.who
+   include embox.cmd.user.whoami
+   include embox.cmd.user.login
+   include embox.cmd.user.su
+   include embox.cmd.smac_adm
+
+   include embox.cmd.coverage
+   include embox.profiler.coverage
+
    include embox.mem.pool_adapter
+   include embox.mem.heap_bm
+   include embox.mem.heap_afterfree_random
+
+   include embox.framework.LibFramework
    include embox.prom.prom_printf
    include embox.util.LibUtil
-   include embox.framework.LibFramework
    include embox.arch.arm.libarch
+   include embox.lib.Print(support_floating=0)
    include embox.lib.LibC

+   include embox.net.dev
+   include embox.net.skbuff(amount_skb=1000,
+           amount_skb_data=1000,data_size=1514,data_align=64,data_padto=64,ip_align=tru
e,
+           amount_skb_extra=256,extra_size=16,extra_align=64,extra_padto=64)
+   include embox.net.core
+   include embox.net.net_entry
+   include embox.net.l2.ethernet
+   include embox.net.arp
+   include embox.net.af_inet
+   include embox.net.ipv4
+   include embox.net.icmpv4
+   include embox.net.udp
+   include embox.net.tcp
+   include embox.net.udp_sock
+   include embox.net.tcp_sock
+   include embox.net.raw_sock
+   include embox.net.lib.dns(nameserver="192.168.0.1")
+   include embox.test.net.socket_test(family=2,type=1,proto=0) /* AF_INET, 
SOCK_STREAM, default */
+   include embox.test.net.inet_socket_test(type=1,proto=0) /* SOCK_STREAM, 
default */
+   include embox.test.net.inet_dgram_socket_test(proto=0) /* default */
+   include embox.test.net.inet_stream_socket_test(proto=0) /* default */
+
+   @Runlevel(1) include 
embox.test.kernel.irq_test(irq_nr=23,outer_irq_nr=23,inner_irq_nr=24,forced_irq_
clear=true)
    @Runlevel(1) include embox.test.critical
    @Runlevel(1) include embox.test.framework.mod.member.ops_test
    @Runlevel(1) include embox.test.kernel.softirq_test
    @Runlevel(1) include embox.test.kernel.timer_test
-   @Runlevel(1) include embox.test.kernel.irq_test(forced_irq_clear=true)
    @Runlevel(1) include embox.test.recursion
    @Runlevel(1) include embox.test.posix.sleep_test
    @Runlevel(1) include embox.test.stdlib.bsearch_test
@@ -83,26 +130,9 @@
    @Runlevel(1) include embox.test.mem.pool_test
    @Runlevel(1) include embox.test.kernel.thread.thread_priority_test
    @Runlevel(1) include embox.test.stdlib.setjmp_test
+   @Runlevel(1) include embox.test.posix.environ_test
+   @Runlevel(1) include embox.test.mem.heap

-   
-   include embox.net.dev
-   include embox.net.skbuff(amount_skb=100,
-           amount_skb_data=100,data_size=1514,data_align=4,data_padto=1,ip_align=true,
-           amount_skb_extra=0,extra_size=0,extra_align=1,extra_padto=1)
-   include embox.net.core
-   include embox.net.net_entry
-   include embox.net.l2.ethernet
-   include embox.net.arp
-   include embox.net.af_inet
-   include embox.net.ipv4
-   include embox.net.icmpv4
-   include embox.net.udp
-   include embox.net.tcp
-   include embox.net.udp_sock
-   include embox.net.tcp_sock
-   include embox.net.raw_sock
-   
-   @Runlevel(2) include embox.mem.static_heap(heap_size=64000000)
-   @Runlevel(2) include embox.mem.heap_bm(heap_size=32000000)
-
+   include embox.kernel.task.resource.security(security_size=32)
+   @Runlevel(2) include embox.security.smac
 }
Index: templates/arm/qemu/start_script.inc
===================================================================
--- templates/arm/qemu/start_script.inc (revision 13736)
+++ templates/arm/qemu/start_script.inc (working copy)
@@ -2,6 +2,28 @@
 "ifconfig lo 127.0.0.1 netmask 255.0.0.0 up",
 "route add 127.0.0.0 netmask 255.0.0.0 lo",
 /* Setup eth0 interface */
-"ifconfig eth0 10.0.2.16 netmask 255.255.255.0 hw ether AA:BB:CC:DD:EE:02 up",
+"ifconfig eth0 10.0.2.16 netmask 255.255.255.0 up",
 "route add 10.0.2.0 netmask 255.255.255.0 eth0",
-"route add default gw 10.0.2.10 eth0",
\ No newline at end of file
+"route add default gw 10.0.2.10 eth0",
+
+"export PWD=/",
+"export HOME=/",
+
+"mkdir /nfs",
+"coverage -o coverage_output",
+"mount -t nfs 10.0.2.10:/home/hak1r/d /nfs",
+
+"smac_adm -R high_label -o low_label  -a r",
+"smac_adm -R low_label  -o high_label -a w",
+"smac_adm -R _     -o smac_admin -a r",
+
+"smac_adm -R confidentially -o unclassified  -a r",
+"smac_adm -R confidentially -o service  -a r",
+"smac_adm -R confidentially -o secret  -a r",
+
+"smac_adm -R secret -o unclassified  -a r",
+"smac_adm -R secret -o service  -a r",
+
+"smac_adm -R service -o unclassified  -a r",
+
+"login",
3.use template arm/qemu; build; run

What is the expected output? What do you see instead?
> login 
login: root
password: Welcome, root!
embox>ls
 dev
 tmp
 smac_users
 passwd
 group
 shadow
 adduser.conf
 nfs
 coverage_output
embox>cp coverage_output nfs/coverage_output

  ______
 |  ____|                                            __          __
 | |___  _ __ ___            ____  ____  ____  _____/ /   _____ / /
 |  ___|| '_ ` _ \          / __ \/ __ \/ __ \/ ___/ /   |_____| |
 | |____| | | | | |_ _ _   / /_/ / /_/ / /_/ (__  )_/    |_____| |
 |______|_| |_| |_(_|_|_)  \____/\____/ .___/____(_)           | |
                                     /_/                        \_\
 ASSERTION FAILED on CPU 0
    at src/mem/heap/mspace_malloc.c:53
    in function pointer_to_segment

__next_at_line_53

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ki.stfu on 16 May 2014 at 12:40

GoogleCodeExporter commented 9 years ago
QEMU emulator version 1.7.0 (qemu-linaro 2014.01), Copyright (c) 2003-2008 
Fabrice Bellard
arm-none-eabi-gcc (GCC) 4.9.0

Original comment by ki.stfu on 16 May 2014 at 2:02

Attachments:

GoogleCodeExporter commented 9 years ago
Hardware watchpoint 1: *0x81b86828

Old value = 6102
New value = 1937076319
0x81073f24 in memcpy (dst_=0x81b864a8, src_=0x8119fe7c 
<__pool_storagethread_pool+61052>, n=132)
    at src/lib/libc/string/memcpy.c:37
37              *aligned_dst++ = *aligned_src++;
(gdb) bt
#0  0x81073f24 in memcpy (dst_=0x81b864a8, src_=0x8119fe7c 
<__pool_storagethread_pool+61052>, n=132)
    at src/lib/libc/string/memcpy.c:37
#1  0x81052760 in xdrrec_putbytes (xs=0x8119fcb0 
<__pool_storagethread_pool+60592>, 
    from=0x8119fe7c <__pool_storagethread_pool+61052> ' ' <repeats 24 times>, "FUNCTION\tEXECUTED\n", ' ' <repeats 12 times>, "_ram_base@0x81008040\t   false\n", ' ' <repeats 12 times>, "_text_vma@0x81008040\t   false\n     trap_table_start@0x81008040\t   false\n   reset_handler_addr@0x81008060"..., size=4096) at src/net/lib/rpc/xdr_rec.c:130
#2  0x810505a4 in xdr_putbytes (xs=0x8119fcb0 
<__pool_storagethread_pool+60592>, 
    from=0x8119fe7c <__pool_storagethread_pool+61052> ' ' <repeats 24 times>, "FUNCTION\tEXECUTED\n", ' ' <repeats 12 times>, "_ram_base@0x81008040\t   false\n", ' ' <repeats 12 times>, "_text_vma@0x81008040\t   false\n     trap_table_start@0x81008040\t   false\n   reset_handler_addr@0x81008060"..., size=4096) at src/net/lib/rpc/xdr.c:52
#3  0x8105110c in xdr_bytes (xs=0x8119fcb0 <__pool_storagethread_pool+60592>, 
    ppc=0x8119fc24 <__pool_storagethread_pool+60452>, psize=0x8119fe00 <__pool_storagethread_pool+60928>, 
    maxsize=4294967295) at src/net/lib/rpc/xdr.c:303
#4  0x8100e754 in xdr_nfs_write_file (xs=0x8119fcb0 
<__pool_storagethread_pool+60592>, 
    point=0x8119fde8 <__pool_storagethread_pool+60904> "P*\030\201") at src/fs/driver/nfs/xdr_nfs.c:306
#5  0x8104ff14 in clnttcp_call (clnt=0x81b35f9c <__pool_storageclnt_pool+48>, 
procnum=7, 
    inproc=0x8100e4fc <xdr_nfs_write_file>, in=0x8119fde8 <__pool_storagethread_pool+60904> "P*\030\201", 
    outproc=0x8100e4fc <xdr_nfs_write_file>, 
    out=0x8119fd70 <__pool_storagethread_pool+60784> 'S' <repeats 28 times>, "\264\375\031\201xi\005\201D\036\001\201", timeout=...) at src/net/lib/rpc/clnt_tcp.c:118
#6  0x8104eac4 in clnt_call (clnt=0x81b35f9c <__pool_storageclnt_pool+48>, 
procnum=7, 
    inproc=0x8100e4fc <xdr_nfs_write_file>, in=0x8119fde8 <__pool_storagethread_pool+60904> "P*\030\201", 
    outproc=0x8100e4fc <xdr_nfs_write_file>, 
    out=0x8119fd70 <__pool_storagethread_pool+60784> 'S' <repeats 28 times>, "\264\375\031\201xi\005\201D\036\001\201", wait=...) at src/net/lib/rpc/clnt.c:89
#7  0x8100d338 in nfs_call_proc_nfs (nas=0x81150358 
<__pool_storagenode_pool+16440>, procnum=7, 
    req=0x8119fde8 <__pool_storagethread_pool+60904> "P*\030\201", 
    reply=0x8119fd70 <__pool_storagethread_pool+60784> 'S' <repeats 28 times>, "\264\375\031\201xi\005\201D\036\001\2---Type <return> to continue, or q <return> to quit---
01") at src/fs/driver/nfs/nfs.c:777
#8  0x8100c000 in nfsfs_write (desc=0x81b34530 <__pool_storagedesc_pool+68>, 
    buf=0x8119fe7c <__pool_storagethread_pool+61052>, size=4096) at src/fs/driver/nfs/nfs.c:169
#9  0x81049e60 in kwrite (buf=0x8119fe7c <__pool_storagethread_pool+61052>, 
size=4096, 
    file=0x81b34530 <__pool_storagedesc_pool+68>) at src/fs/syslib/kfile.c:111
#10 0x8105bae0 in idesc_file_ops_write (idesc=0x81b34530 
<__pool_storagedesc_pool+68>, 
    buf=0x8119fe7c <__pool_storagethread_pool+61052>, nbyte=4096) at src/fs/index_operation.c:35
#11 0x81078630 in write (fd=6, buf=0x8119fe7c 
<__pool_storagethread_pool+61052>, nbyte=4096)
    at src/compat/posix/fs/write.c:26
#12 0x8101ff94 in exec (argc=3, argv=0x811a0ecc 
<__pool_storagethread_pool+65228>) at src/cmds/fs/cp.c:69
#13 0x8105a69c in cmd_exec (cmd=0x810d863c <__mod__embox__cmd__fs(char,  
*)+20>, argc=3, 
    argv=0x811a0ecc <__pool_storagethread_pool+65228>) at src/framework/cmd/core.c:39
#14 0x810168a4 in run_cmd (data=0x8119ce60 <__pool_storagethread_pool+48736>) 
at src/cmds/shell/tish.c:151
#15 0x810126c8 in task_trampoline (arg_=0x8119d0d4 
<__pool_storagethread_pool+49364>) at src/kernel/task/multi.c:45
#16 0x81013538 in thread_trampoline () at src/kernel/thread/core.c:65
#17 0x8101347c in err_ptr (err_code=-2129014784) at src/include/err.h:13
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) f 1
#1  0x81052760 in xdrrec_putbytes (xs=0x8119fcb0 
<__pool_storagethread_pool+60592>, 
    from=0x8119fe7c <__pool_storagethread_pool+61052> ' ' <repeats 24 times>, "FUNCTION\tEXECUTED\n", ' ' <repeats 12 times>, "_ram_base@0x81008040\t   false\n", ' ' <repeats 12 times>, "_text_vma@0x81008040\t   false\n     trap_table_start@0x81008040\t   false\n   reset_handler_addr@0x81008060"..., size=4096) at src/net/lib/rpc/xdr_rec.c:130
130         memcpy(xs->extra.rec.out_curr, from, bytes);
(gdb) print byte
No symbol "byte" in current context.
(gdb) print bytes
$1 = 1028
(gdb) print xs->extra.rec
$2 = {handle = 0x81b35f9c <__pool_storageclnt_pool+48> 
"H`\263\201h\361\n\201\004", in_hnd = 0x81050124 <readtcp>, 
  in_base = 0x81b86020 "\024`\270\201\024`\270\201", 'A' <repeats 192 times>..., 
  in_hdr = 0x81b86020 "\024`\270\201\024`\270\201", 'A' <repeats 192 times>..., 
  in_curr = 0x81b86020 "\024`\270\201\024`\270\201", 'A' <repeats 192 times>..., 
  in_boundry = 0x81b86424 "AAAA\001\264\244R", in_prep = 0, in_left = 0, in_last = 1 '\001', 
  out_hnd = 0x810501c0 <writetcp>, out_base = 0x81b86424 "AAAA\001\264\244R", 
  out_hdr = 0x81b86424 "AAAA\001\264\244R", 
  out_curr = 0x81b864a8 ' ' <repeats 24 times>, "FUNCTION\tEXECUTED\n", ' ' <repeats 12 times>, "_ram_base@0x81008040\t   false\n", ' ' <repeats 12 times>, "_text_vma@0x81008040\t   false\n     trap_table_start@0x81008040\t   false\n   reset_handler_addr@0x81008060"..., out_boundry = 0x81b86828 "_pus\024`\270\201\024`\270\201"}

Original comment by ki.stfu on 21 May 2014 at 12:32

GoogleCodeExporter commented 9 years ago
fixed by r13790

Original comment by ki.stfu on 21 May 2014 at 2:54