Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18' 이호연] 최종보고서 #70

Open
DanielTimLee opened this issue Oct 24, 2018 · 0 comments
Open

[18' 이호연] 최종보고서 #70

DanielTimLee opened this issue Oct 24, 2018 · 0 comments

Comments

@DanielTimLee
Copy link

DanielTimLee commented Oct 24, 2018

Question (Gitter Chat)

  1. uftaceENODATA 에러를 출력하는 조건?
    https://gitter.im/uftrace/uftrace?at=5b9a7df4f4bd1056ac5989fe

uftrace.data에 task 정보가 존재하지 않을 시에 ENODATA 출력

  1. libmcount.so 의 디버깅 방법? (debug uftrace --force command?)
    https://gitter.im/uftrace/uftrace?at=5ba7e4c15df519473401b365

(gdb) set follow-fork-mode child # libmcount.so를 디버깅하기 위해 꼭 필요.
(gdb) set breakpoint pending on # 상세 내용은 uftrace internal 문서 참고
(gdb) b plt_hooker

  1. Uftrace의 동작 call graph를 출력하는 방법? (Call graph of uftrace execution?)
    https://gitter.im/uftrace/uftrace?at=5bb73869ef4afc4f2820db69

solution 1. uftrace '-pg' 옵션 주고 trace. libmcount.so 는 추적 불가. 재진입 문제) <make TRACE=1>
solution 2. uftrace Execution에 대한 code coverage 참조 <make COVERAGE=1>

Issue & Pull Request

  1. 디버그 스크립트

Issue namhyung#511
Background: misc/debug.sh 스크립트를 이용한 디버깅이 용이하지 않음.
uftrace를 통해 트레이싱할 바이너리가 misc/debug-mcount.cmd 에 하드코딩되어 있음.
원하는 바이너리를 테스트해보려면 파일을 직접 수정해야됨.

Solution: misc/debug.sh에 바이너리 이름과 Args. 넘겨서 수정 없이 디버깅 가능하게 함.
-> Pull Request namhyung#510

  1. 설치 스크립트 자동화

Issue namhyung#531
Background: misc/install-deps.sh 스크립트에 -y 인자를 넘겨줄 방법이 없음.
테스트 목적을 위해 도커 이미지를 만들고 싶었으나 이 기능이 없어서 만들 수 없었음.

Solution: misc/install-deps.sh 스크립트에 -y 인자를 넘겨줄 수 있게 함
-> Pull Request namhyung#532
Uftrace Docker Image
Travis : Build Status

  1. Test 빌드 시간

Issue namhyung#569
Background: test target 빌드가 전부 순차적으로 진행되기 때문에 너무 오래 걸림.

Solution: Python multiprocessing.pool을 이용해 병렬 프로세싱 진행.
-> Pull Request namhyung#570
-> Build Time Compare: namhyung#569 (comment)
-> Parallel build demo: namhyung#569 (comment)

  1. Test 088, 181 s-forkexec 빌드 의존성

Issue namhyung#569
Background: s-forkexec 빌드 스크립트의 t-abc 바이너리에 대한 의존성 빌드가 빠져 있음.

Solution: Testbase.build() override 해서 빌드 추가.
-> Pull Request namhyung#570

  1. GCC8의 String truncation 경고 처리

Issue namhyung#571
Background: 최신 GCC8 컴파일러에서 string truncation에 대한 경고 메세지 발생.

Solution: strncpy 대신 memcpy로 처리, wstringop_truncation supress 코드 제거.
-> Pull Request namhyung#572

Discussion & Suggestion

  1. make -j 8 로 컴파일 할 시에 check-depsCCFLAGS 빠짐.

Issue namhyung#564
Background: make -j 1 일 경우엔 상관이 없지만, 여러 task worker로 빌드를 할 시에 알 수 없는 이유로 CCFLAGS 가 빠진 채로 빌드가 됨.
(check-deps/Makefile.check 부분이 include 되지 않은 상태로 빌드)

  1. test sample 바이너리

Issue namhyung#530
Background: 트레이싱을 통한 sample 바이너리를 test target 을 통해 빌드할 수 있는데,
test 과정이 너무 오래 걸림.

Solution: sample target 생성하는 방향으로 처리하기로 결정

  1. perf event tracing이 동작하지 않음.

Issue namhyung#513
Background: cat /proc/sys/kernel/perf_event_paranoid 값이 2 미만일때 Event Tracing 안됨.
사용자에게 Warning 메시지를 통해 값 변경에 대해 안내해주면 좋을것 같음.

Solution: 유저의 권한이 값을 설정할 수 없을 수 있음. (+ Verbose 모드를 통해 알 수 있는 정보임)

  1. .PLT.GOT 섹션이 없는 바이너리의 경우 트레이싱 에러?

Issue namhyung#529
Background: -fno-plt 컴파일 된 바이너리의 경우 .PLT.GOT 섹션이 없고, 트레이싱 불가.
트레이싱이 불가할 때 아무 메시지 없이 uftrace.data unavailable 에러 메시지만 띄우면,
사용자에 입장에서 컴파일을 잘못한건지, uftrace가 지원하지 않는 기능인지 알 수 없음.

따라서 이런 경우 Warning 혹은 Error 메시지를 통해 .PLT.GOT 가 없어서 발생하는 문제고,
아직 지원하지 않음에 대해 안내하는것이 좋을 것 같음.

Solution: -no-plt에 대해 트레이싱은 앞으로 추가될 기능이기 때문에 없어도 될 것 같음.

  1. -pie Position Independent Execution 파일 지원?

Issue namhyung#524
Background: -pie 컴파일된 바이너리 트레이싱 지원 여부?
-> 이미 지원중.

Closed Issues & PR

  1. TESTARG 테스트 번호

Issue namhyung#552
Background: 테스트 진행시 TESTARG를 통해 테스트 번호를 넘길때 0 pad 된 숫자를 넘겨야 됨.
ex) export TESTARG='12'; make test; -> 012, 112, 120, 121.122... # 12가 들어간 모든 케이스를 실행

Solution: TESTARG 의 테스트 번호 파싱 후 해당 테스트 번호만 가져오도록 함. (012 만 가져오도록)
-> Pull Request namhyung#553 : 0 pad 한 test number을 넘기도록 의도한 거라 closed.

  1. elfutils 버전

Pull Request namhyung#538
Background: misc/install-elfutils.shelfutils 버전이 하드코딩 되어 있음.

Solution: git ls-remote 를 통해 remote의 tag를 불러와 최신 태그를 통해 버전정보를 불러오게 함.
-> 버전 정보 하드코딩은 의도한 거라 closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant