[Go] ์คํ์ค์ธ ํ๋ก์ธ์ค์ ๋ํด memory dump ํ์ผ์ ๋จ๊ธฐ๊ณ GoLand๋ก ๋ถ์ํ๊ธฐ
๊ธ ์์ฑ์: ๋ฅํด๋ฒ .
๋ฐ์ํ
Memory Dump ํ์ผ ๋จ๊ธฐ๊ธฐ
- Linux ํ๊ฒฝ(Virtual Machine - CentOS7 ๊ธฐ์ค)
1. gdb ์ค์น(๋์ด์๋ค๋ฉด ์๋ต)
yum install gdb
2. ๋์์ด ๋๋ ํ๋ก์ธ์ค ์ถ์
$ ps -ef | grep socket
root 7896 18386 0 Nov04 ? 00:01:47 /game/server/socketServer/20191104_175539/dev_socket/dev_socket -ServerType=Dev
root 29534 29485 0 16:34 pts/1 00:00:00 grep --color=auto socket
3. memory dump ๋จ๊ธฐ๊ธฐ
$ gcore 7896
warning: File "/usr/lib/golang/src/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/usr/share/gdb/auto-load:/usr/lib/debug:/usr/bin/mono-gdb.py".
To enable execution of this file add
add-auto-load-safe-path /usr/lib/golang/src/runtime/runtime-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New LWP 12406]
[New LWP 7915]
[New LWP 7914]
[New LWP 7910]
[New LWP 7908]
[New LWP 7906]
[New LWP 7904]
[New LWP 7903]
[New LWP 7902]
[Thread debugging using libthread_db enabled]
runtime.futex () at /usr/lib/golang/src/runtime/sys_linux_amd64.s:536
536 MOVL AX, ret+40(FP)
Saved corefile core.7896
4. ๊ฐ๋ฐํ๊ฒฝ์ผ๋ก memory dumpํ์ผ๊ณผ ์คํ๋๊ณ ์๋ ํ๋ก์ธ์ค ๋น๋๋ฅผ ์ ์ก
(ํ์ผ ์ ์ก์๋ ์ฌ๋ฌ ๋ฐฉ๋ฒ์ด ์์ง๋ง ์ด ๊ธ์์ WinSCP๋ฅผ ์ฌ์ฉํ์์)
- Windows ํ๊ฒฝ
์์ ๊ด๋ฆฌ์์์ ์คํ ์ค์ธ ํ๋ก์ธ์ค๋ฅผ ๋์์ผ๋ก ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ → ๋คํ ํ์ผ ๋ง๋ค๊ธฐ ์ ํ
GoLand๋ก ๋ถ์
1. <Run> → <Open Core Dump...>
2. ๋น๋ ํ์ผ๊ณผ ์ฝ์ด๋คํ ํ์ผ ์ง์
3. ๋ถ์
์ฐธ๊ณ
https://blog.jetbrains.com/go/2019/03/13/debugging-in-goland-windows-minidumps/
https://blog.jetbrains.com/go/2019/03/04/debugging-with-goland-advanced-debugging-features/
๋ฐ์ํ
'Language > Go' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Go์์ ์์ฃผ ์ฌ์ฉํ๋ reflect ๊ตฌ๋ฌธ (Golang reflect) (2) | 2019.06.21 |
---|---|
Go์์ ์ค์ํ๊ธฐ ์ฌ์ด ์ผ์ด์ค - defer, panic, recover (0) | 2019.04.24 |
๋๊ธ
์ด ๊ธ ๊ณต์ ํ๊ธฐ
-
๊ตฌ๋
ํ๊ธฐ
๊ตฌ๋ ํ๊ธฐ
-
์นด์นด์คํก
์นด์นด์คํก
-
๋ผ์ธ
๋ผ์ธ
-
ํธ์ํฐ
ํธ์ํฐ
-
Facebook
Facebook
-
์นด์นด์ค์คํ ๋ฆฌ
์นด์นด์ค์คํ ๋ฆฌ
-
๋ฐด๋
๋ฐด๋
-
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
-
Pocket
Pocket
-
Evernote
Evernote
๋ค๋ฅธ ๊ธ
-
Go์์ ์์ฃผ ์ฌ์ฉํ๋ reflect ๊ตฌ๋ฌธ (Golang reflect)
Go์์ ์์ฃผ ์ฌ์ฉํ๋ reflect ๊ตฌ๋ฌธ (Golang reflect)
2019.06.21 -
Go์์ ์ค์ํ๊ธฐ ์ฌ์ด ์ผ์ด์ค - defer, panic, recover
Go์์ ์ค์ํ๊ธฐ ์ฌ์ด ์ผ์ด์ค - defer, panic, recover
2019.04.24