{"action":"opened","issue":{"url":"https://api.github.com/repos/pscedu/slash2/issues/109","labels_url":"https://api.github.com/repos/pscedu/slash2/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/pscedu/slash2/issues/109/comments","events_url":"https://api.github.com/repos/pscedu/slash2/issues/109/events","html_url":"https://github.com/pscedu/slash2/issues/109","id":89847018,"number":109,"title":"NULL site inside uswi_enqueue_sites()","user":{"login":"slovichon","id":6945653,"avatar_url":"https://avatars.githubusercontent.com/u/6945653?v=3","gravatar_id":"","url":"https://api.github.com/users/slovichon","html_url":"https://github.com/slovichon","followers_url":"https://api.github.com/users/slovichon/followers","following_url":"https://api.github.com/users/slovichon/following{/other_user}","gists_url":"https://api.github.com/users/slovichon/gists{/gist_id}","starred_url":"https://api.github.com/users/slovichon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slovichon/subscriptions","organizations_url":"https://api.github.com/users/slovichon/orgs","repos_url":"https://api.github.com/users/slovichon/repos","events_url":"https://api.github.com/users/slovichon/events{/privacy}","received_events_url":"https://api.github.com/users/slovichon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pscedu/slash2/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-21T01:49:02Z","updated_at":"2015-06-21T01:49:02Z","closed_at":null,"body":"\nOn 2011-02-03 15:43:37 -0500, Zhihui Zhang wrote:\n\n> While debugging my namespace replication code, I got the following:\n> \n> [New Thread 0x2aaacbfcb940 (LWP 2274)]\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> [Switching to Thread 0x7164e940 (LWP 2196)]\n> 0x00000000005b1b49 in uswi_enqueue_sites (wk=0x18b5b30, iosv=0x7164dbb0, nios=25909392)\n>     at /home/zhihui/projects-wolverine/slash_nara/slashd/up_sched_res.c:1078\n> 1078                    smi = site->site_pri;\n> (gdb) p smi\n> $1 = (struct site_mds_info *) 0x18b5b30\n> (gdb) p site\n> $2 = (struct sl_site *) 0x0\n> (gdb) bt\n> # 0  0x00000000005b1b49 in uswi_enqueue_sites (wk=0x18b5b30, iosv=0x7164dbb0, nios=25909392)\n>     at /home/zhihui/projects-wolverine/slash_nara/slashd/up_sched_res.c:1078\n> # 1  0x00000000004d5d03 in slm_ptrunc_core (wkrq=0x18b4960) at /home/zhihui/projects-wolverine/slash_nara/slashd/mds.c:1820\n> # 2  0x00000000005c0793 in slm_worker_main (thr=0x18b56f0) at /home/zhihui/projects-wolverine/slash_nara/slashd/worker.c:40\n> # 3  0x000000000059fd15 in _pscthr_begin (arg=0x7fffffffb110) at /home/zhihui/projects-wolverine/psc_fsutil_libs/psc_util/thread.c:328\n> # 4  0x00000039ede0673d in start_thread () from /lib64/libpthread.so.0\n> # 5  0x00000039ed6d3f6d in clone () from /lib64/libc.so.6\n> (gdb) up\n> # 1  0x00000000004d5d03 in slm_ptrunc_core (wkrq=0x18b4960) at /home/zhihui/projects-wolverine/slash_nara/slashd/mds.c:1820\n> 1820            uswi_enqueue_sites(uswi, ios_list.iosv, ios_list.nios);\n> (gdb) l\n> 1815\n> 1816            rc = uswi_findoradd(&fcmh->fcmh_fg, &uswi);\n> 1817            if (rc)\n> 1818                    psc_fatal(\"uswi_findoradd: %s\",\n> 1819                        slstrerror(rc));\n> 1820            uswi_enqueue_sites(uswi, ios_list.iosv, ios_list.nios);\n> 1821            uswi_unref(uswi);\n> 1822\n> 1823            fcmh_op_done_type(fcmh, FCMH_OPCNT_WORKER);\n> 1824            return (0);\n> (gdb) \n> \n> (gdb) l\n> 1073\n> 1074            locked = psc_pthread_mutex_reqlock(&wk->uswi_mutex);\n> 1075            wk->uswi_gen++;\n> 1076            for (n = 0; n < nios; n++) {\n> 1077                    site = libsl_resid2site(iosv[n].bs_id);\n> 1078                    smi = site->site_pri;\n> 1079\n> 1080                    spinlock(&smi->smi_lock);\n> 1081                    if (!psc_dynarray_exists(&smi->smi_upq, wk)) {\n> 1082                            psc_dynarray_add(&smi->smi_upq, wk);\n> (gdb) p n\n> $10 = 0\n> (gdb) p nios\n> $11 = 25909392\n> (gdb) p iosv[n].bs_id\n> $12 = 9885456\n\nOn 2011-02-03 15:59:48 -0500, Zhihui Zhang wrote:\n\n> Hit again:\n> \n> [New Thread 0x2aaacb18b940 (LWP 5813)]\n> [New Thread 0x2aaacbb8c940 (LWP 5814)]\n> \n> Program received signal SIGSEGV, Segmentation fault.\n> [Switching to Thread 0x7164e940 (LWP 5750)]\n> 0x00000000005b1b49 in uswi_enqueue_sites (wk=0x18b7590, iosv=0x7164dbb0, nios=25916144)\n>     at /home/zhihui/projects-wolverine/slash_nara/slashd/up_sched_res.c:1078\n> 1078                    smi = site->site_pri;\n> (gdb) bt\n> # 0  0x00000000005b1b49 in uswi_enqueue_sites (wk=0x18b7590, iosv=0x7164dbb0, nios=25916144)\n>     at /home/zhihui/projects-wolverine/slash_nara/slashd/up_sched_res.c:1078\n> # 1  0x00000000004d5d03 in slm_ptrunc_core (wkrq=0x992110) at /home/zhihui/projects-wolverine/slash_nara/slashd/mds.c:1820\n> # 2  0x00000000005c0793 in slm_worker_main (thr=0x18b7150) at /home/zhihui/projects-wolverine/slash_nara/slashd/worker.c:40\n> # 3  0x000000000059fd15 in _pscthr_begin (arg=0x7fffffffc140) at /home/zhihui/projects-wolverine/psc_fsutil_libs/psc_util/thread.c:328\n> # 4  0x00000039ede0673d in start_thread () from /lib64/libpthread.so.0\n> # 5  0x00000039ed6d3f6d in clone () from /lib64/libc.so.6\n> (gdb) \n> \n> The receiving md crashes and when I restart it, I hit this.\n> \n> The receiving mds does not handle the file directly, it just duplicates namespace from its peer.  Not sure why it wants to do partial truncate.\n\nOn 2011-02-03 17:14:07 -0500, Jared Yanovich wrote:\n\n> Fixed by -r 15287.\n\n"}}