runtime verification using csp - 産業技術総合研究所...2015/03/23  · runtime...

15
Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami Hagiya, Alexander Kohan, Lei Ma, Nazim Sebih, Yoshinori Tanabe, Mitsuharu Yamamoto, Franz Weitl 1

Upload: others

Post on 31-May-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Runtime verification using CSPTSSS-3

AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami Hagiya, Alexander Kohan, Lei Ma, Nazim Sebih, Yoshinori Tanabe, Mitsuharu Yamamoto, Franz Weitl1

Page 2: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Web servers

Backend server

Internet

Page 3: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Web servers

Backend serverMonitoring server

Log

Log

Internet

Page 4: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Goal

Runtime monitoring framework with

• natural notations for concurrency

• integration to the network applications

• web server, DB, syslog, etc…

Page 5: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Current status

• A monitor for dtruss output is implemented

• Check whether open/close system calls are matched or not

Page 6: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Monitor definition

Page 7: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Usage

Page 8: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Example of state explosion

Page 9: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Parsing function

Page 10: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Command line$ sudo dtruss ls 2> ls.log Password: $ time target/pack/bin/strace-match < ls.log > trace SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

real 0m1.012s user 0m0.956s sys 0m0.177s

Page 11: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Output traceSYSCALL(args) = return {Set(jp.go.aist.cspe.Rec0@2b2948e2)} 1

close(0x3) = 0 0 {Set()} 0

{Set()} 0 false

Page 12: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Corrected log$ time target/pack/bin/strace-match < correct.log > trace SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

real 0m0.679s user 0m1.343s sys 0m0.104s

Page 13: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Output trace - correctedcsops(0x18A4, 0x7, 0x7FFF526A0AB0) = 0 0 {Set(||Set('EOF) Bag(jp.go.aist.cspe.ParamPrefixRelaxed@70beb599; ||Set('EOF) Bag(jp.go.aist.cspe.Rec0@2b2948e2; jp.go.aist.cspe.ParamPrefixRelaxed@641147d0)), ||Set('EOF) Bag(jp.go.aist.cspe.Rec0@2b2948e2; jp.go.aist.cspe.ParamPrefixRelaxed@70beb599))} 2

{Set(||Set('EOF) Bag(STOP, STOP))} 1 true

Page 14: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Observation

• Parsing log file is not trivial

• use of fluentd?

• Writing down a correct monitor is not easy

• State explosion easily occurs

Page 15: Runtime verification using CSP - 産業技術総合研究所...2015/03/23  · Runtime verification using CSP TSSS-3 AIST, Mar. 23, 2015 Yoriyuki Yamagata, Artho Cyrille, Masami

Future works

• Handle EOF implicitly

• Complete modeling of file descriptor life cycle

• Improve error reporting

• Interface to fluentd