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

xlog signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) #567

Closed
longerian opened this issue Mar 29, 2019 · 10 comments
Closed

xlog signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) #567

longerian opened this issue Mar 29, 2019 · 10 comments

Comments

@longerian
Copy link

从详细crash堆栈来看,启动阶段初始化的时候就挂了,

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr ec99a000
r0 00000000 r1 00000000 r2 00049fc0 r3 ec99a000
r4 ac07eb40 r5 ec999000 r6 ce5c6dd0 r7 ac40ff08
r8 13b25e90 r9 ac0193d8 10 138a15c0 fp 13068220
ip 00000000 sp ce5c6d7c lr cbcf28c3 pc f6e31d70 cpsr 20010010
#00 pc 0x16d70 libc.so (memset+48)
#1 pc 0x88bf libmarsxlog.so (_ZN9LogBuffer7__ClearEv+22)
#2 pc 0x8929 libmarsxlog.so (_ZN9LogBuffer5FlushER10AutoBuffer+88)
#3 pc 0x803d libmarsxlog.so
#4 pc 0x815d libmarsxlog.so (Z13appender_open13TAppenderModePKcS1_S1_S1+16)
#5 pc 0x845f libmarsxlog.so (Z24appender_open_with_cache13TAppenderModeRKSsS1_PKcS3_S3+758)
#6 pc 0x4d3b libmarsxlog.so (Java_xxxxx_appenderOpen+446)
#7 pc 0x2b1a25b base.odex

机型

名称 占比
PLK-TL01H 0.52 51
vivo Y66 0.36 36
OPPO R9s 0.1 10
HTC_M10h 0.02 2

品牌

名称 占比
HONOR 0.52 51
vivo 0.36 36
OPPO 0.1 10
htc 0.02 2

系统

名称 占比
6.0 0.52 51
6.0.1 0.46 46
8.0.0 0.02 2
@garryyan
Copy link
Collaborator

garryyan commented Apr 2, 2019

这个提交 带了吗

@longerian
Copy link
Author

longerian commented Apr 2, 2019

还真的没带上,是确认同一个问题吗?
我们有两个app,一个app里出现里这个问题,另一个没有,所以我也不确定是不是上述提交能修复。

@zhangyanru
Copy link

@longerian 有个问题length和maxLength传入的是一样的,也会出现这个问题吗?如果也会出现,那原因是什么?正常链路没看到为什么会出现。

@zhangyanru
Copy link

@garryyan 有个问题length和maxLength传入的是一样的,也会出现这个问题吗?如果也会出现,那原因是什么?正常链路没看到为什么会出现。

@garryyan
Copy link
Collaborator

garryyan commented Apr 2, 2019

@zhangyanru

length和maxLength传入的是一样的,也会出现这个问题吗?

一样是指什么?是指代码已经是 memset(buff_.Ptr(), 0, buff_.Length()); ?

@zhangyanru
Copy link

buff_.Attach(_pbuffer, _len);
调到
void PtrBuffer::Attach(void* _pBuffer, size_t _nLen) {
Attach(_pBuffer, _nLen, _nLen);
}
再调到
void PtrBuffer::Attach(void* _pBuffer, size_t _nLen, size_t maxlen) {
Reset();
parray
= (unsigned char*)pBuffer;
length
= nLen;
max_length
= maxlen;
}
所以length
和 max_length_是一样的
全局搜了,只有这一个地方给max_length_赋值的

@garryyan
Copy link
Collaborator

garryyan commented Apr 9, 2019

__Fix 函数中会把 length 改为0 的

@longerian
Copy link
Author

我们更新下代码,再灰度下,谢谢

@longerian
Copy link
Author

已经fix

@cclover
Copy link

cclover commented Jan 20, 2020

这里memset maxLength 为什么有的有问题有的没问题? 按道理这个大小就是mmap的大小, 为什么会出错??

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

4 participants