Rigorous and Reliable (RAR)

Full Version: BIBO -- O
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9

zhihao

(09-19-2020 02:53 PM)lingu Wrote: [ -> ]zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py,返回procone.py查询到的结果,构建返回的json。

zhihao

(09-19-2020 08:29 PM)zhihao Wrote: [ -> ]
(09-19-2020 02:53 PM)lingu Wrote: [ -> ]zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py返回procone.py查询到的结果,构建返回的json。

我想在talk2thinker.sh的 flog_enable_timestamp=True flog " received new case in $newcasepfn" 下面加上以下代码,把接收到的案例信息存放到文件夹名最大的目录内
Code:
...
...
  /bin/cp $reqpfn $newcasepfn
  flog_enable_timestamp=True flog "    received new case in $newcasepfn"

  # if "type":"insert"
  casetype=`jq '.type' $newcasepfn`
  if [[ $casetype == "\"insert\"" ]]; then
    newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
    mkdir $newdir
    casecnt=$((++newdir))
    cp $newcasepfn $newdir/insert.json

    echo -e "{\n\
    "code": 200,\n\
    "msg": "ok",\n\
    "children": []\n\
    }"
    exit 0
  fi

RR lingu

zhihao

g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
(09-19-2020 08:29 PM)zhihao Wrote: [ -> ]
(09-19-2020 02:53 PM)lingu Wrote: [ -> ]zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py,返回procone.py查询到的结果,构建返回的json。

Why do you just write it here without generating any results?

Ask for review, then update the headpost.

Use [ code ] to wrap pseudocode.
(09-20-2020 01:45 AM)zhihao Wrote: [ -> ]
(09-19-2020 08:29 PM)zhihao Wrote: [ -> ]
(09-19-2020 02:53 PM)lingu Wrote: [ -> ]zhihao - it looks like there is no progress in this project. You should document the logic of simpleserv, then propose a change for the insert function.


simpleserv.sh
监听62818端口,执行talk2thinker.sh

talk2thinker.sh
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

tellThinker()
将"@$spc (-1 -1 -1 -1 -1 -1) > (0 $reqno $j) $toneroot/procone.py --tycano $j"写入$toneroot/manytasks.ts作为sage执行的任务。

procone.py
在某一案例内容中搜索key{1,2,3},构建"keys": []。

getresults()
执行thinkres.py返回procone.py查询到的结果,构建返回的json。

我想在talk2thinker.sh的 flog_enable_timestamp=True flog " received new case in $newcasepfn" 下面

Dont specify the location like this. Reply the existing pseudocode, and specify what you want to do.

Quote:加上以下代码,把接收到的案例信息存放到文件夹名最大的目录内

...
...
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))
cp $newcasepfn $newdir/insert.json

OK.

Quote: echo -e "{\n\
"code": 200,\n\
"msg": "ok",\n\
"children": []\n\
}"
exit 0
fi

i dont know whether it is a good idea to generate the response here. But it is okay to design like this now and we can improve later.

Quote:RR lingu

OK.

But don't write code. Write pseudocode. Don't you know this rule?
(09-22-2020 01:30 PM)zhihao Wrote: [ -> ]g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
[/quote]

here is an error. Didn't you see it? Should figure out the reason and solve the problem.

[quote]
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?

zhihao

(09-22-2020 01:45 PM)lingu Wrote: [ -> ]
(09-22-2020 01:30 PM)zhihao Wrote: [ -> ]g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found
Code:
[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh
/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao    79215  0.0  0.0  83556  7856 pts/44   T    11:27   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao   101997  0.0  0.0 112728  2328 pts/44   S+   12:26   0:00 grep --color=auto ssh -t

[2]+  Stopped                 sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?

simpleserv.log内容如下
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao
[zhihao@g1b-2 zhihao]$ ls
auntie.log      procone-16.log  procone-25.log  procone-7.log
procone-10.log  procone-17.log  procone-2.log   procone-8.log
procone-11.log  procone-19.log  procone-3.log   procone-9.log
procone-12.log  procone-1.log   procone-4.log   sage.log
procone-13.log  procone-23.log  procone-5.log   simpleserv.log
procone-14.log  procone-24.log  procone-6.log   talk2thinker-x.log
[zhihao@g1b-2 zhihao]$ cat simpleserv.log
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
working [0920-18:45:41]
      received: /{"type":"query","query":"陈邓昌抢劫、盗窃,付志强盗窃案(检例第17号)【推送字段】入户抢劫入户盗窃+暴力【关键词】第二审程序刑事抗诉入户抢劫盗窃罪补充起诉【基本案情】被告人陈邓昌,男,​贵州省人,1989年出生,无业。被告人付志强,男,贵州省人,1981年出生,农民。一、抢劫罪2012年2月18日15时,被告人陈邓昌携带螺丝刀等作案工具来到广东​省佛山市禅城区澜石石头后二村田边街10巷1号的一间出租屋,撬门进入房间盗走现金人民币100元,后在客厅遇到被害人陈南姐,陈邓昌拿起铁锤威胁不让其喊叫,并逃离现场​。二、盗窃罪1.2012年2月23日,被告人付志强携带作案工具来到广东省佛山市高明区荷城街道井溢村398号302房间,撬门进入房间内盗走现金人民币300元。2.​2012年2月25日,被告人付志强、陈邓昌密谋后携带作案工具到佛山市高明区荷城街道井溢村287号502出租屋,撬锁进入房间盗走一台华硕笔记本电脑(价值人民币29​05元)。后二人以1300元的价格销赃。3.2012年2月28日,被告人付志强携带作案工具来到佛山市高明区荷城街道井溢村243号402房间,撬锁进入房间后盗走现​金人民币1500元。4.2012年3月3日,被告人付志强、陈邓昌密谋后携带六角匙等作案工具到佛山市高明区荷城街道官当村34号401房,撬锁进入房间后盗走现金人民​币700元。5.2012年3月28日,被告人陈邓昌、叶其元、韦圣伦(后二人另案处理,均已判刑)密谋后携带作案工具来到佛山市禅城区跃进路31号501房间,叶其元负​责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走联想一体化电脑一台(价值人民币3928元)、尼康P300数码相机一台(价值人民币1813元)及600元现金人民币。后​在逃离现场的过程中被人发现,陈邓昌等人将一体化电脑丢弃。6.2012年4月3日,被告人付志强携带作案工具来到佛山市高明区荷城街道岗头冯村283号301房间,撬锁​进入房间后盗走现金人民币7000元。7.2012年4月13日,被告人陈邓昌、叶其元、韦圣伦密谋后携带作案工具来到佛山市禅城区石湾凤凰路隔田坊63号5座303房间​,叶其元负责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走现金人民币6000元、港币900元以及一台诺基亚N86手机(价值人民币608元)。【诉讼过程】2012年4​月6日,付志强因涉嫌盗窃罪被广东省佛山市公安局高明分局刑事拘留,同年5月9日被逮捕。2012年5月29日,陈邓昌因涉嫌盗窃罪被佛山市公安局高明分局刑事拘留,同年​7月2日被逮捕。2012年7月6日,佛山市公安局高明分局以犯罪嫌疑人付志强、陈邓昌涉嫌盗窃罪向佛山市高明区人民检察院移送审查起诉。2012年7月23日,高明区人​民检察院以被告人付志强、陈邓昌犯盗窃罪向佛山市高明区人民法院提起公诉。一审期间,高明区人民检察院经进一步审查,发现被告人陈邓昌有三起遗漏犯罪事实。2012年9月​24日,高明区人民检察院依法补充起诉被告人陈邓昌入室盗窃转化为抢劫的犯罪事实一起和陈邓昌伙同叶其元、韦圣伦共同盗窃的犯罪事实二起。2012年11月14日,佛山市​高明区人民法院一审认为,检察机关指控被告人陈邓昌犯抢劫罪、盗窃罪,被告人付志强犯盗窃罪的犯罪事实清楚,证据确实充分,罪名成立。被告人陈邓昌在入户盗窃后被发现,为​抗拒抓捕而当场使用凶器相威胁,其行为符合转化型抢劫的构成要件,应以抢劫罪定罪处罚,但不应认定为“入户抢劫”。理由是陈邓昌入户并不以实施抢劫为犯罪目的,而是在户内​临时起意以暴力相威胁,且未造成被害人任何损伤,依法判决:被告人陈邓昌犯抢劫罪,处有期徒刑三年九个月,并处罚金人民币四千元;犯盗窃罪,处有期徒刑一年九个月,并处罚​金人民币二千元;决定执行有期徒刑五年,并处罚金人民币六千元元。被告人付志强犯盗窃罪,处有期徒刑二年,并处罚金人民币二千元。2012年11月19日,佛山市高明区人​民检察院认为一审判决适用法律错误,造成量刑不当,依法向佛山市中级人民法院提出抗诉。2013年3月21日,佛山市中级人民法院二审判决采纳了抗诉意见,撤销原判对原审​被告人陈邓昌抢劫罪量刑部分及决定合并执行部分,依法予以改判。【抗诉理由】一审宣判后,佛山市高明区人民检察院审查认为一审判决未认定被告人陈邓昌的行为属于“入户抢劫​”,属于适用法律错误,且造成量刑不当,应予纠正,遂依法向佛山市中级人民法院提出抗诉;佛山市人民检察院支持抗诉。抗诉和支持抗诉理由是:1.原判决对“入户抢劫”的理​解存在偏差。原判决以“暴力行为虽然发生在户内,但是其不以实施抢劫为目的,而是在户内临时起意并以暴力相威胁,且未造成被害人任何损害”为由,未认定被告人陈邓昌所犯抢​劫罪具有“入户”情节。根据2005年7月《最高人民法院关于审理抢劫、抢夺刑事案件适用法律若干问题的意见》关于认定“入户抢劫”的规定,“入户”必须以实施抢劫等犯罪​为目的。但是,这里“目的”的非法性不是以抢劫罪"}/ ..more
      received: // ..more
      received a blank line
  talk2thinker reqno: 0
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0920-18:45:41]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
Sending results: [0920-18:45:59]
{
"code": 404,
"msg": "not found",
"children": [
]
}

{
"code": 404,
"msg": "not found",
"children": [
]
}

      for exit status 1, we recycle thinker
    session returns 0
  initializing thinker state
working [0920-18:47:47]
    session returns 0
  tardy client. abandoning this session
  initializing thinker state
working [0920-19:01:27]
  tardy client. abandoning this session
    session returns 0
[zhihao@g1b-2 zhihao]$

simpleserv.log为前两天生成的文件
Code:
[zhihao@g1b-2 zhihao]$ ll
total 192
-rw-rw-r-- 1 zhihao zhihao 47638 Sep 20 19:01 auntie.log
-rw-rw-r-- 1 zhihao zhihao  4228 Sep 20 18:01 procone-10.log
-rw-rw-r-- 1 zhihao zhihao  1260 Sep 19 15:26 procone-11.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:26 procone-12.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-13.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-14.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-16.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-17.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-19.log
-rw-rw-r-- 1 zhihao zhihao  1250 Sep 20 18:06 procone-1.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-23.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-24.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-25.log
-rw-rw-r-- 1 zhihao zhihao  1372 Sep 20 18:06 procone-2.log
-rw-rw-r-- 1 zhihao zhihao  2058 Sep 19 15:26 procone-3.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-4.log
-rw-rw-r-- 1 zhihao zhihao   808 Sep 19 15:26 procone-5.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-6.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-7.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-8.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-9.log
-rw-rw-r-- 1 zhihao zhihao 35974 Sep 20 19:01 sage.log
-rw-rw-r-- 1 zhihao zhihao  9058 Sep 20 19:01 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  2171 Sep 20 18:45 talk2thinker-x.log
[zhihao@g1b-2 zhihao]$
(09-22-2020 01:30 PM)zhihao Wrote: [ -> ]g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found

[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh

why sudo?

Quote:
Quote:
Quote:/home/sage2/sage/bin/sage_clear: line 34: coolauntie: command not found
^C[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh &
[2] 97729
[zhihao@g1b-2 procuratorate]$ ps aux | grep "ssh -t"
zhihao 79215 0.0 0.0 83556 7856 pts/44 T 11:27 0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao 101997 0.0 0.0 112728 2328 pts/44 S+ 12:26 0:00 grep --color=auto ssh -t

[2]+ Stopped sudo bash simpleserv.sh
[zhihao@g1b-2 procuratorate]$
[/code]

simpleserv服务已启动
Code:
[zhihao@g1b-2 procuratorate]$ ps aux | grep "simpleserv"
root      97729  0.0  0.0 214220  6204 pts/44   T    12:25   0:00 sudo bash simpleserv.sh
zhihao   112347  0.0  0.0 112728  2332 pts/44   S+   12:28   0:00 grep --color=auto simpleserv
[zhihao@g1b-2 procuratorate]$

尝试ncat,长时间无任何输出
Code:
[root@limbo30-1 processed]# ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050

what's in simpleserv's log?

simpleserv.log内容如下
Code:
[zhihao@g1b-2 zhihao]$ pwd
/thinker/local/today/users/zhihao
[zhihao@g1b-2 zhihao]$ ls
auntie.log      procone-16.log  procone-25.log  procone-7.log
procone-10.log  procone-17.log  procone-2.log   procone-8.log
procone-11.log  procone-19.log  procone-3.log   procone-9.log
procone-12.log  procone-1.log   procone-4.log   sage.log
procone-13.log  procone-23.log  procone-5.log   simpleserv.log
procone-14.log  procone-24.log  procone-6.log   talk2thinker-x.log
[zhihao@g1b-2 zhihao]$ cat simpleserv.log
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
working [0920-18:45:41]
      received: /{"type":"query","query":"陈邓昌抢劫、盗窃,付志强盗窃案(检例第17号)【推送字段】入户抢劫入户盗窃+暴力【关键词】第二审程序刑事抗诉入户抢劫盗窃罪补充起诉【基本案情】被告人陈邓昌,男,​贵州省人,1989年出生,无业。被告人付志强,男,贵州省人,1981年出生,农民。一、抢劫罪2012年2月18日15时,被告人陈邓昌携带螺丝刀等作案工具来到广东​省佛山市禅城区澜石石头后二村田边街10巷1号的一间出租屋,撬门进入房间盗走现金人民币100元,后在客厅遇到被害人陈南姐,陈邓昌拿起铁锤威胁不让其喊叫,并逃离现场​。二、盗窃罪1.2012年2月23日,被告人付志强携带作案工具来到广东省佛山市高明区荷城街道井溢村398号302房间,撬门进入房间内盗走现金人民币300元。2.​2012年2月25日,被告人付志强、陈邓昌密谋后携带作案工具到佛山市高明区荷城街道井溢村287号502出租屋,撬锁进入房间盗走一台华硕笔记本电脑(价值人民币29​05元)。后二人以1300元的价格销赃。3.2012年2月28日,被告人付志强携带作案工具来到佛山市高明区荷城街道井溢村243号402房间,撬锁进入房间后盗走现​金人民币1500元。4.2012年3月3日,被告人付志强、陈邓昌密谋后携带六角匙等作案工具到佛山市高明区荷城街道官当村34号401房,撬锁进入房间后盗走现金人民​币700元。5.2012年3月28日,被告人陈邓昌、叶其元、韦圣伦(后二人另案处理,均已判刑)密谋后携带作案工具来到佛山市禅城区跃进路31号501房间,叶其元负​责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走联想一体化电脑一台(价值人民币3928元)、尼康P300数码相机一台(价值人民币1813元)及600元现金人民币。后​在逃离现场的过程中被人发现,陈邓昌等人将一体化电脑丢弃。6.2012年4月3日,被告人付志强携带作案工具来到佛山市高明区荷城街道岗头冯村283号301房间,撬锁​进入房间后盗走现金人民币7000元。7.2012年4月13日,被告人陈邓昌、叶其元、韦圣伦密谋后携带作案工具来到佛山市禅城区石湾凤凰路隔田坊63号5座303房间​,叶其元负责望风,陈邓昌、韦圣伦二人撬锁进入房间后盗走现金人民币6000元、港币900元以及一台诺基亚N86手机(价值人民币608元)。【诉讼过程】2012年4​月6日,付志强因涉嫌盗窃罪被广东省佛山市公安局高明分局刑事拘留,同年5月9日被逮捕。2012年5月29日,陈邓昌因涉嫌盗窃罪被佛山市公安局高明分局刑事拘留,同年​7月2日被逮捕。2012年7月6日,佛山市公安局高明分局以犯罪嫌疑人付志强、陈邓昌涉嫌盗窃罪向佛山市高明区人民检察院移送审查起诉。2012年7月23日,高明区人​民检察院以被告人付志强、陈邓昌犯盗窃罪向佛山市高明区人民法院提起公诉。一审期间,高明区人民检察院经进一步审查,发现被告人陈邓昌有三起遗漏犯罪事实。2012年9月​24日,高明区人民检察院依法补充起诉被告人陈邓昌入室盗窃转化为抢劫的犯罪事实一起和陈邓昌伙同叶其元、韦圣伦共同盗窃的犯罪事实二起。2012年11月14日,佛山市​高明区人民法院一审认为,检察机关指控被告人陈邓昌犯抢劫罪、盗窃罪,被告人付志强犯盗窃罪的犯罪事实清楚,证据确实充分,罪名成立。被告人陈邓昌在入户盗窃后被发现,为​抗拒抓捕而当场使用凶器相威胁,其行为符合转化型抢劫的构成要件,应以抢劫罪定罪处罚,但不应认定为“入户抢劫”。理由是陈邓昌入户并不以实施抢劫为犯罪目的,而是在户内​临时起意以暴力相威胁,且未造成被害人任何损伤,依法判决:被告人陈邓昌犯抢劫罪,处有期徒刑三年九个月,并处罚金人民币四千元;犯盗窃罪,处有期徒刑一年九个月,并处罚​金人民币二千元;决定执行有期徒刑五年,并处罚金人民币六千元元。被告人付志强犯盗窃罪,处有期徒刑二年,并处罚金人民币二千元。2012年11月19日,佛山市高明区人​民检察院认为一审判决适用法律错误,造成量刑不当,依法向佛山市中级人民法院提出抗诉。2013年3月21日,佛山市中级人民法院二审判决采纳了抗诉意见,撤销原判对原审​被告人陈邓昌抢劫罪量刑部分及决定合并执行部分,依法予以改判。【抗诉理由】一审宣判后,佛山市高明区人民检察院审查认为一审判决未认定被告人陈邓昌的行为属于“入户抢劫​”,属于适用法律错误,且造成量刑不当,应予纠正,遂依法向佛山市中级人民法院提出抗诉;佛山市人民检察院支持抗诉。抗诉和支持抗诉理由是:1.原判决对“入户抢劫”的理​解存在偏差。原判决以“暴力行为虽然发生在户内,但是其不以实施抢劫为目的,而是在户内临时起意并以暴力相威胁,且未造成被害人任何损害”为由,未认定被告人陈邓昌所犯抢​劫罪具有“入户”情节。根据2005年7月《最高人民法院关于审理抢劫、抢夺刑事案件适用法律若干问题的意见》关于认定“入户抢劫”的规定,“入户”必须以实施抢劫等犯罪​为目的。但是,这里“目的”的非法性不是以抢劫罪"}/ ..more
      received: // ..more
      received a blank line
  talk2thinker reqno: 0
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0920-18:45:41]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
Sending results: [0920-18:45:59]
{
"code": 404,
"msg": "not found",
"children": [
]
}

{
"code": 404,
"msg": "not found",
"children": [
]
}

      for exit status 1, we recycle thinker
    session returns 0
  initializing thinker state
working [0920-18:47:47]
    session returns 0
  tardy client. abandoning this session
  initializing thinker state
working [0920-19:01:27]
  tardy client. abandoning this session
    session returns 0
[zhihao@g1b-2 zhihao]$

simpleserv.log为前两天生成的文件

It is a problem. Then you should debug it.

Quote:
Code:
[zhihao@g1b-2 zhihao]$ ll
total 192
-rw-rw-r-- 1 zhihao zhihao 47638 Sep 20 19:01 auntie.log
-rw-rw-r-- 1 zhihao zhihao  4228 Sep 20 18:01 procone-10.log
-rw-rw-r-- 1 zhihao zhihao  1260 Sep 19 15:26 procone-11.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:26 procone-12.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-13.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-14.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-16.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-17.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-19.log
-rw-rw-r-- 1 zhihao zhihao  1250 Sep 20 18:06 procone-1.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-23.log
-rw-rw-r-- 1 zhihao zhihao   630 Sep 19 15:27 procone-24.log
-rw-rw-r-- 1 zhihao zhihao   691 Sep 19 15:27 procone-25.log
-rw-rw-r-- 1 zhihao zhihao  1372 Sep 20 18:06 procone-2.log
-rw-rw-r-- 1 zhihao zhihao  2058 Sep 19 15:26 procone-3.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-4.log
-rw-rw-r-- 1 zhihao zhihao   808 Sep 19 15:26 procone-5.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-6.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-7.log
-rw-rw-r-- 1 zhihao zhihao   686 Sep 19 15:26 procone-8.log
-rw-rw-r-- 1 zhihao zhihao   625 Sep 19 15:26 procone-9.log
-rw-rw-r-- 1 zhihao zhihao 35974 Sep 20 19:01 sage.log
-rw-rw-r-- 1 zhihao zhihao  9058 Sep 20 19:01 simpleserv.log
-rw-rw-r-- 1 zhihao zhihao  2171 Sep 20 18:45 talk2thinker-x.log
[zhihao@g1b-2 zhihao]$

With sudo, the user becomes root, and you should look into root's log dir.
Code:
13:32:55 lingu@g1b-2:/thinker/local/today/users/root> ll simpleserv.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
13:33:03 lingu@g1b-2:/thinker/local/today/users/root>

zhihao

(09-22-2020 02:35 PM)lingu Wrote: [ -> ]With sudo, the user becomes root, and you should look into root's log dir.
Code:
13:32:55 lingu@g1b-2:/thinker/local/today/users/root> ll simpleserv.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
13:33:03 lingu@g1b-2:/thinker/local/today/users/root>

是的,simpleserv.sh有新的日志,而talk2thinker.sh为前两天,说明simpleserv内代码出问题了。
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ll simpleserv.log talk2thinker-x.log
-rw-r--r-- 1 root root 331558 Sep 22 11:45 simpleserv.log
-rw-r--r-- 1 root root 116635 Sep 20 22:29 talk2thinker-x.log
[zhihao@g1b-2 root]$

通过日志定位到simpleserv.sh的该行代码‘ sage_user=sage2 /home/sage2/sage/bin/sage_clear‘过不去。
Code:
[zhihao@g1b-2 root]$ tail simpleserv.log
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
    session returns 2
  recycling at reqno 7
  initializing thinker state
  initializing thinker state
[zhihao@g1b-2 root]$

simpleserv.sh
Code:
while true; do
  ## echo "Start servicing"
  if [[ "$reqno" == "0" ]]; then
    flog "  initializing thinker state"
    sage_user=sage2 /home/sage2/sage/bin/sage_clear
    sleep 3
  fi
  ncat --listen 62818 --sh-exec /home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh
  rr=$?
  flog "    session returns $rr"

查询sage日志,看到“.ts”缺少文件名。
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ll sage.log
-rw-r--r-- 1 root root 10515 Sep 22 11:45 sage.log
[zhihao@g1b-2 root]$ tail sage.log
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
  
sage_clear run by root
  erase with /thinker/local/today/users/root/.ts log to /thinker/local/today/users/root/sage.log
[zhihao@g1b-2 root]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ cat .ts
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 root]$

simpleserve.sh内提及的sage_clear程序使用了coolauntie。判断是coolauntie命令没有往下执行,目前找到该命令的路径为 /thinker/bin/coolauntie。
Code:
[zhihao@g1b-2 bin]$ cat /home/sage2/sage/bin/sage_clear
#!/bin/bash
# Copyright since 2019, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2019, Hututa Technologies Limited
# All rights reserved.
#
# sage_clear
#
# Authors: Lin Gu


set -o errexit

modname=sage

curdir=$(readlink -f $(dirname $0))
base=$curdir/../..
source /thinker/local/forest/util/utilib/bash.inc
export log_pfn=$(logpfn)

# Design:
# i from 0 to sage_atp_staff_space_cnt
# @i ( -1 -1 -1 -1 -1 -1 ) > ( 0 0 $i ) count 1
# @i ( 0 0 $i 0 0 $i ) > ( 0 1 $i ) increase 1
#      namely 1+1=2
# @sage_atp_head_space ( 0 1 0 0 1 sage_atp_staff_space_cnt ) > ( 0 2 0 ) sum
#      namely 2+2+...=2*sage_atp_staff_space_cnt
function Action () {
  # Generate command file
  todaypfn=$(todaydir)/$progname
  local turbots=${todaypfn}.ts

  echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
  flog "  erase with $turbots log to $log_pfn"
  coolauntie register $turbots >> $log_pfn
}

flog " "
flog "sage_clear run by $USER"

Action

[zhihao@g1b-2 bin]$ which coolauntie
/thinker/bin/coolauntie
[zhihao@g1b-2 bin]$

coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash

# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu

progname=coolauntie

source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit


[zhihao@g1b-2 bin]$

Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$

zhihao

(09-22-2020 02:35 PM)lingu Wrote: [ -> ]
(09-22-2020 01:30 PM)zhihao Wrote: [ -> ]g1b上开通trajan:20050到localhost:62818的通道。启动服务时提示coolauntie: command not found

[zhihao@g1b-2 procuratorate]$ sudo bash simpleserv.sh

why sudo?

因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住
Code:
[zhihao@g1b-2 procuratorate]$ bash simpleserv.sh

Code:
[zhihao@limbo30-1 processed]$ pwd
/data/20200906.1/processed
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
Pages: 1 2 3 4 5 6 7 8 9
Reference URL's