Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-05 Thread mariappan balraj
signal: segmentation fault FAILmisc/cgo/test 0.671s Best Regards Mariappan On Thu, Apr 6, 2023 at 2:22 AM Ian Lance Taylor wrote: > On Tue, Apr 4, 2023 at 9:20 PM mariappan balraj > wrote: > > > > In my test case, I have tried, Go-->C-->Go->panic() only. > >

Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-04 Thread mariappan balraj
Hi Ian, In my test case, I have tried, Go-->C-->Go->panic() only. On Wed, Apr 5, 2023 at 3:35 AM Ian Lance Taylor wrote: > On Mon, Apr 3, 2023 at 9:26 PM mariappan balraj > wrote: > > > > Hi Kurtis Rader, > > > > Thanks for your response. I am working o

Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-04 Thread mariappan balraj
Sorry. Forgot to share go environment. root@soomohan:/home/soomohan/mbalraj/test_hb2# go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/root/g

Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-03 Thread mariappan balraj
/MariappanBalraj/test_cgo_panic/archive/refs/heads/main.zip Best Regards Mariappan On Mon, Apr 3, 2023 at 9:50 AM Robert Engels wrote: > I would start by publishing a small reproducible test case on github that > fully compiles that demonstrates the issue. > > On Apr 2, 2023, at 10:59 PM, mari

Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-03 Thread mariappan balraj
this type of problem for the customers of the companies I worked for. > > On Mon, Apr 3, 2023 at 8:16 PM mariappan balraj < > mariappan.bal...@gmail.com> wrote: > >> Hi Robert, >> >> Eagerly waiting for your help. Some further update. >> >> I have

Re: [go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-03 Thread mariappan balraj
ime.goexit at /home/soomohan/mbalraj/GO/go1.20.2/go/src/runtime/asm_amd64.s:1598 Stack trace looks fine till this point. Best Regards Mariappan On Mon, Apr 3, 2023 at 9:50 AM Robert Engels wrote: > I would start by publishing a small reproducible test case on github that > fully co

[go-nuts] When assert is called from C code, dlv is not able to decode the core dump.

2023-04-03 Thread mariappan balraj
Hello Go Experts, Raised the following issue on DLV to track this issue. https://github.com/go-delve/delve/issues/3322 Best Regards Mariappan -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving ema

[go-nuts] Need help: Calling panic() is corrupting system stack

2023-04-02 Thread mariappan balraj
Hello Go Experts, It is good if someone can help on this? Best Regards Mariappan On Sat, Apr 1, 2023 at 7:45 AM mariappan balraj wrote: > Hello Go experts, > > Could someone please help to resolve this issue? > > Best Regards > Mariappan > > On Thu, Mar 30, 2023 at

[go-nuts] Re: Calling panic() is corrupting system stack

2023-03-31 Thread mariappan balraj
Hello Go experts, Could someone please help to resolve this issue? Best Regards Mariappan On Thu, Mar 30, 2023 at 2:52 PM mariappan balraj wrote: > Hello Go Experts, > > When panic() is called from Go function, in the below call sequence, > runtime.unwindm() [which is defer

[go-nuts] Re: Calling panic() is corrupting system stack

2023-03-30 Thread mariappan balraj
t /home/soomohan/mbalraj/GO/go1.20.2/go/src/runtime/panic.go:642 1 0x00434357 in runtime.gopanic at /home/soomohan/mbalraj/GO/go1.20.2/go/src/runtime/panic.go:886 2 0x004642a7 in main.Test4 at ./export.go:7 On Tue, Mar 28, 2023 at 4:14 PM mariappan balraj wrote: > Hello

[go-nuts] Calling panic() is corrupting system stack

2023-03-28 Thread mariappan balraj
Hello Go Experts, I am observing system stack corruption when panic() is called from go function. When panic is called from Test4(), as part of runtime.systemstack_switch(), the RSP and RBP is set in such a way that it will corrupt the stack. Rbp = 0x7ffdb188bd20===> This should be less than

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-17 Thread mariappan balraj
the stack trace from >> the core dump. Is there any other technique to debug this issue? Can you >> please help if any other technique is there? >> >> Best Regards >> Mariappan >> >> On Mon, Jan 9, 2023 at 12:07 PM Ian Lance Taylor >> wrote: >

Re: [go-nuts] Re: Debugging memory leak when a GO process crashed

2023-01-12 Thread mariappan balraj
sn't not release unused > memory back to the operating system as quickly as they'd like or expect, > showing as high RSS. If that's your issue then it can be discussed. > > On Thursday, 12 January 2023 at 03:58:52 UTC mariappa...@gmail.com wrote: > >> Hello Go exp

[go-nuts] Re: Debugging memory leak when a GO process crashed

2023-01-11 Thread mariappan balraj
Hello Go experts, Can someone please help with this? Best Regards Mariappan On Tue, Jan 10, 2023 at 1:24 PM mariappan balraj wrote: > Hello Go experts, > > I could able to find the solution to debug memory leaks of GO process, > when it is running by using PPROF. Is it possible to

[go-nuts] Debugging memory leak when a GO process crashed

2023-01-09 Thread mariappan balraj
Hello Go experts, I could able to find the solution to debug memory leaks of GO process, when it is running by using PPROF. Is it possible to collect the heap profile for debugging, when GO process crashed using core dump? or what is the recommended way to root cause the memory leak? Based on the

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-09 Thread mariappan balraj
, Jan 9, 2023 at 12:07 PM Ian Lance Taylor wrote: > On Sun, Jan 8, 2023, 9:33 PM mariappan balraj > wrote: > >> Hi Ian, >> >> Thanks for all your replies. It really shows that you have tried to give >> your best all the time. I need some direction to get a perm

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-08 Thread mariappan balraj
that I can try best from my side. Best Regards Mariappan On Sat, Jan 7, 2023 at 10:29 PM Ian Lance Taylor wrote: > On Fri, Jan 6, 2023 at 9:01 PM mariappan balraj > wrote: > > > > Thanks for your continuous support. GOLANG supports CGO to invoke C > functions. When it is sup

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
=0xc58fe0 sp=0xc58f80 pc=0x434c92 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc58fe8 sp=0xc58fe0 pc=0x45c761 Best Regards Mariappan On Sat, Jan 7, 2023 at 9:45 AM Ian Lance Taylor wrote: > On Fri, Jan 6, 2023, 5:57 PM mariappan balraj > wrote: >

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
am Ian Lance Taylor, wrote: > On Fri, Jan 6, 2023 at 5:28 PM mariappan balraj > wrote: > > > > I am not expecting GO stack. I am interested only in getting C stack. If > I want go stack, I can use delve debugger to get it. From GO, using CGO, > test3() is called which is

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-06 Thread mariappan balraj
Ian Lance Taylor, wrote: > On Thu, Jan 5, 2023 at 10:39 PM mariappan balraj > wrote: > > > > When I call the same function from pure C code, I am able to get the > complete stack and it is not reporting that the stack is corrupted. I am > expecting the same C stack whe

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-05 Thread mariappan balraj
*p = (int*)NULL; *p = 30; //assert(1 == 2); } void test2(void) { test1(); } void test3(void) { test2(); } int main(void) { test3(); } Best Regards Mariappan On Fri, Jan 6, 2023 at 11:42 AM mariappan balraj wrote: > Hi Ian, > > Thanks for your quick reply. I have

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-05 Thread mariappan balraj
e/ubuntu/mbalraj/GO/TEST/go.mod" GOWORK="" CGO_CFLAGS="-g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fm

Re: [go-nuts] CGO core dump analysis using GDB

2023-01-05 Thread mariappan balraj
PM mariappan balraj > wrote: > > > > I have following programming where making CGO from GO code. test3() is > called from Go code. Which calls test2() and which calls test1(). In > test1(), there is a NULL pointer assignment. I could able to generate the > core dump when runn

[go-nuts] Re: CGO core dump analysis using GDB

2023-01-04 Thread mariappan balraj
+5:30 mariappan balraj wrote: > Hi, > > I have following programming where making CGO from GO code. test3() is > called from Go code. Which calls test2() and which calls test1(). In > test1(), there is a NULL pointer assignment. I could able to generate the > core dump when r

[go-nuts] CGO core dump analysis using GDB

2022-12-22 Thread mariappan balraj
Hi, I have following programming where making CGO from GO code. test3() is called from Go code. Which calls test2() and which calls test1(). In test1(), there is a NULL pointer assignment. I could able to generate the core dump when running the program. But when I use gdb, I am not getting the