Re: any suggestions to detect memory corruption

2019-05-09 Thread Alex
On Thu, May 9, 2019 at 9:30 PM Tom Lane wrote: > Alex writes: > > Someone add some code during backend init which used palloc. but at that > > time, the CurrentMemoryContext is PostmasterContext. at the end of > > backend initialization, the PostmasterContext is deleted, then the error > > ha

Re: any suggestions to detect memory corruption

2019-05-09 Thread Tom Lane
Alex writes: > Someone add some code during backend init which used palloc. but at that > time, the CurrentMemoryContext is PostmasterContext. at the end of > backend initialization, the PostmasterContext is deleted, then the error > happens. the reason why it happens randomly is before the pa

Re: any suggestions to detect memory corruption

2019-05-08 Thread Alex
Thanks you Tom and Robert! I tried valgrind, and looks it help me fix the issue. Someone add some code during backend init which used palloc. but at that time, the CurrentMemoryContext is PostmasterContext. at the end of backend initialization, the PostmasterContext is deleted, then the erro

Re: any suggestions to detect memory corruption

2019-05-08 Thread Robert Haas
On Wed, May 8, 2019 at 10:34 AM Tom Lane wrote: > Alex writes: > > I can get the following log randomly and I am not which commit caused it. > > > 2019-05-08 21:37:46.692 CST [60110] WARNING: problem in alloc set index > > info: req size > alloc size for chunk 0x2a33a78 in block 0x2a33a18 > > I'

Re: any suggestions to detect memory corruption

2019-05-08 Thread Tom Lane
Alex writes: > I can get the following log randomly and I am not which commit caused it. > 2019-05-08 21:37:46.692 CST [60110] WARNING: problem in alloc set index > info: req size > alloc size for chunk 0x2a33a78 in block 0x2a33a18 I've had success in finding memory stomp causes fairly quickly

any suggestions to detect memory corruption

2019-05-08 Thread Alex
I can get the following log randomly and I am not which commit caused it. I spend one day but failed at last. 2019-05-08 21:37:46.692 CST [60110] WARNING: problem in alloc set index info: req size > alloc size for chunk 0x2a33a78 in block 0x2a33a18 2019-05-08 21:37:46.692 CST [60110] WARNING: i