最近遇到一个suse的crash 问题:

我没有使用 mkswap /dev/磁盘路径 来制作swap分区,我有很多剩余内存,我设置nr_swapfiles为0,可是我还是遇到了关于swap的crash。

We got more kernel crashes at swapin_readahead() on our kernel:
[ 948.894273] BUG: unable to handle kernel NULL pointer dereference at 000000000000000c
[ 948.894283] IP: [<ffffffff81133662>] valid_swaphandles+0x72/0x150
[ 948.894292] PGD 3e4b007067 PUD 3e4b008067 PMD
[ 948.894296] Oops: [#] SMP
[ 948.894301] CPU
[ 948.894302] Modules linked in: xfs w83627dhg(EN) af_packet tipc(EX) ossmod(EN) iptable_filter ip_tables x_tables bonding edd cpufreq_conservative cpufreq_userspace cpufreq_po
wersave acpi_cpufreq mperf binfmt_misc fuse loop dm_mod ipv6 ipv6_lib pcspkr i40e(EX) igb ses enclosure dca iTCO_wdt sg ptp pps_core i2c_i801 iTCO_vendor_support mei mptctl mptb
ase rtc_cmos button acpi_power_meter container ext3 jbd mbcache usbhid hid ttm drm_kms_helper drm i2c_algo_bit sysimgblt sysfillrect i2c_core syscopyarea ehci_hcd usbcore usb_co
mmon sd_mod crc_t10dif processor thermal_sys hwmon scsi_dh_rdac scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh ahci libahci libata mpt3sas(EX) configfs scsi_transport_sas raid_c
lass scsi_mod [last unloaded: witdriver]
[ 948.894346] Supported: No, Unsupported modules are loaded
[ 948.894348]
[ 948.894350] Pid: , comm: nginx Tainted: G ENX 3.0.-0.47.-default # ZTE Grantley/S1008
[ 948.894354] RIP: :[<ffffffff81133662>] [<ffffffff81133662>] valid_swaphandles+0x72/0x150
[ 948.894357] RSP: :ffff883e4b021ca8 EFLAGS:
[ 948.894359] RAX: RBX: 00181818182f98a0 RCX:
[ 948.894362] RDX: 000000000000408e RSI: RDI: ffffffff81e56ce0
[ 948.894364] RBP: R08: R09:
[ 948.894366] R10: ffff883e4b011218 R11: ffff883e4dac4bc0 R12: 00181818182f9898
[ 948.894368] R13: 00181818182f989a R14: R15: ffff883e4b021d30
[ 948.894371] FS: 00007f1c66ca7720() GS:ffff88407dda0000() knlGS:
[ 948.894373] CS: DS: ES: CR0: 000000008005003b
[ 948.894375] CR2: 000000000000000c CR3: 0000003e4b006000 CR4: 00000000001407e0
[ 948.894377] DR0: DR1: DR2:
[ 948.894380] DR3: DR6: 00000000ffff0ff0 DR7:
[ 948.894382] Process nginx (pid: , threadinfo ffff883e4b020000, task ffff883e4b01e540)
[ 948.894384] Stack:
[ 948.894385] ffff883e4b021cc4 30181818182f989a 00007f1ac86072fc
[ 948.894391] ffff883f89f0c038 ffff883fbe860d78 00000000000200da ffffffff81132bd6
[ 948.894397] 30181818182f989a
[ 948.894401] Call Trace:
[ 948.894411] [<ffffffff81132bd6>] swapin_readahead+0x26/0xd0
[ 948.894417] [<ffffffff81122a8d>] do_swap_page+0xed/0x5f0
[ 948.894422] [<ffffffff81123ab1>] handle_pte_fault+0x1e1/0x230
[ 948.894429] [<ffffffff8146873d>] do_page_fault+0x1fd/0x4c0
[ 948.894434] [<ffffffff81465345>] page_fault+0x25/0x30
[ 948.894440] [<00007f1c65877dab>] 0x7f1c65877daa
[ 948.894441] Code: ff ff ff ff c5 4c eb d3 eb d3 e3 db 4c 0f e3 e8 cc b8 e9 d3 e0 c3
[ 948.894455] 8b 0c c3 c7 8d 0f fb f8
[ 948.894462] RIP [<ffffffff81133662>] valid_swaphandles+0x72/0x150
[ 948.894465] RSP <ffff883e4b021ca8>
[ 948.894467] CR2: 000000000000000c We also collect vmcore.
crash> dis -l valid_swaphandles+0x72
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133662 <valid_swaphandles+>: mov 0xc(%r14),%eax crash> dis -l valid_swaphandles
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff811335f0 <valid_swaphandles>: push %r15
0xffffffff811335f2 <valid_swaphandles+>: mov %rsi,%r15
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff811335f5 <valid_swaphandles+>: xor %esi,%esi
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff811335f7 <valid_swaphandles+>: push %r14
0xffffffff811335f9 <valid_swaphandles+>: push %r13
0xffffffff811335fb <valid_swaphandles+>: push %r12
0xffffffff811335fd <valid_swaphandles+>: push %rbp
0xffffffff811335fe <valid_swaphandles+>: push %rbx
0xffffffff811335ff <valid_swaphandles+>: sub $0x8,%rsp
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133603 <valid_swaphandles+>: mov 0xd233c3(%rip),%ebp # 0xffffffff81e569cc
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133609 <valid_swaphandles+>: test %ebp,%ebp
0xffffffff8113360b <valid_swaphandles+>: je 0xffffffff81133723 <valid_swaphandles+>
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133611 <valid_swaphandles+>: mov %rdi,%rax
/home/chengry/linux-3.0.-0.47./include/linux/swapops.h:
0xffffffff81133614 <valid_swaphandles+>: mov %rdi,%r13
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133617 <valid_swaphandles+>: mov %ebp,%ecx
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133619 <valid_swaphandles+>: shr $0x39,%rax
/home/chengry/linux-3.0.-0.47./include/linux/spinlock.h:
0xffffffff8113361d <valid_swaphandles+>: mov $0xffffffff81e56ce0,%rdi
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133624 <valid_swaphandles+>: mov $0x1,%r12d
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff8113362a <valid_swaphandles+>: mov -0x7e1a9300(,%rax,),%r14
/home/chengry/linux-3.0.-0.47./include/linux/swapops.h:
0xffffffff81133632 <valid_swaphandles+>: movabs $0x1ffffffffffffff,%rax
0xffffffff8113363c <valid_swaphandles+>: and %rax,%r13
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff8113363f <valid_swaphandles+>: mov %r13,%rbx
0xffffffff81133642 <valid_swaphandles+>: shr %cl,%rbx
0xffffffff81133645 <valid_swaphandles+>: shl %cl,%rbx
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133648 <valid_swaphandles+>: test %rbx,%rbx
0xffffffff8113364b <valid_swaphandles+>: cmovne %rbx,%r12
/home/chengry/linux-3.0.-0.47./include/linux/spinlock.h:
0xffffffff8113364f <valid_swaphandles+>: callq 0xffffffff81464c20 <_raw_spin_lock>
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133654 <valid_swaphandles+>: mov $0x1,%eax
0xffffffff81133659 <valid_swaphandles+>: mov %ebp,%ecx
0xffffffff8113365b <valid_swaphandles+>: shl %cl,%eax
0xffffffff8113365d <valid_swaphandles+>: cltq
0xffffffff8113365f <valid_swaphandles+>: add %rax,%rbx
0xffffffff81133662 <valid_swaphandles+>: mov 0xc(%r14),%eax
0xffffffff81133666 <valid_swaphandles+>: cmp %rax,%rbx
0xffffffff81133669 <valid_swaphandles+>: mov %rax,%rdi
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff8113366c <valid_swaphandles+>: lea 0x1(%r13),%rax
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133670 <valid_swaphandles+>: cmovbe %rbx,%rdi
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff81133674 <valid_swaphandles+>: cmp %rdi,%rax
0xffffffff81133677 <valid_swaphandles+>: jae 0xffffffff81133734 <valid_swaphandles+>
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff8113367d <valid_swaphandles+>: mov 0x10(%r14),%rcx
0xffffffff81133681 <valid_swaphandles+>: movzbl 0x1(%rcx,%r13,),%edx
0xffffffff81133687 <valid_swaphandles+>: test %dl,%dl
0xffffffff81133689 <valid_swaphandles+>: je 0xffffffff81133734 <valid_swaphandles+>
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff8113368f <valid_swaphandles+>: and $0xffffffbf,%edx
0xffffffff81133692 <valid_swaphandles+>: cmp $0x3f,%dl
0xffffffff81133695 <valid_swaphandles+>: je 0xffffffff81133734 <valid_swaphandles+>
0xffffffff8113369b <valid_swaphandles+>: add %r13,%rcx
0xffffffff8113369e <valid_swaphandles+>: xor %esi,%esi
0xffffffff811336a0 <valid_swaphandles+>: jmp 0xffffffff811336bc <valid_swaphandles+>
0xffffffff811336a2 <valid_swaphandles+>: nopw 0x0(%rax,%rax,)
/home/chengry/linux-3.0.-0.47./mm/swapfile.c:
0xffffffff811336a8 <valid_swaphandles+>: movzbl 0x2(%rcx),%edx
0xffffffff811336ac <valid_swaphandles+>: test %dl,%dl
0xffffffff811336ae <valid_swaphandles+>: je 0xffffffff811336c8 <valid_swaphandles+> and the source code should be:
int valid_swaphandles(swp_entry_t entry, unsigned long *offset)
{
struct swap_info_struct *si;
int our_page_cluster = page_cluster;
pgoff_t target, toff;
pgoff_t base, end;
int nr_pages = ; if (!our_page_cluster) /* no readahead */
return ; si = swap_info[swp_type(entry)];
target = swp_offset(entry);
base = (target >> our_page_cluster) << our_page_cluster;
end = base + ( << our_page_cluster);
if (!base) /* first page is swap header */
base++; spin_lock(&swap_lock);
if (frontswap_test(si, target)) {
spin_unlock(&swap_lock);
return ;
}
if (end > si->max) /* don't go beyond end of map */
end = si->max; it means that we get (swap_info_struct si ) is null。 and i get the related value :
crash> p swap_info
swap_info = $ =
{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0} crash> p swap_list
swap_list = $ = {
head = -,
next = -
} crash> p nr_swapfiles
nr_swapfiles = $ = crash> p total_swap_pages
total_swap_pages = $ =
crash> p least_priority
least_priority = $ = crash> p nr_swap_pages
nr_swap_pages = $ =
crash> p vm_swappiness
vm_swappiness = $ =
crash> p min_free_kbytes
min_free_kbytes = $ = crash> kmem -i
PAGES TOTAL PERCENTAGE
TOTAL MEM 251.5 GB ----
FREE 107.1 GB % of TOTAL MEM
USED 144.4 GB % of TOTAL MEM
SHARED 8.4 GB % of TOTAL MEM
BUFFERS 63.3 MB % of TOTAL MEM
CACHED 92.9 GB % of TOTAL MEM
SLAB 5.4 GB % of TOTAL MEM TOTAL SWAP ----
SWAP USED % of TOTAL SWAP
SWAP FREE % of TOTAL SWAP
#5 [ffff883e4b021bf0] page_fault at ffffffff81465345
[exception RIP: valid_swaphandles+114]
RIP: ffffffff81133662 RSP: ffff883e4b021ca8 RFLAGS: 00010216
RAX: 0000000000000008 RBX: 00181818182f98a0 RCX: 0000000000000003
RDX: 000000000000408e RSI: 0000000000000000 RDI: ffffffff81e56ce0
RBP: 0000000000000003 R8: 0000000000000000 R9: 0000000000000029
R10: ffff883e4b011218 R11: ffff883e4dac4bc0 R12: 00181818182f9898
R13: 00181818182f989a R14: 0000000000000000 R15: ffff883e4b021d30
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0000
ffff883e4b021bf8: ffff883e4b021d30 0000000000000000
ffff883e4b021c08: 00181818182f989a 00181818182f9898
ffff883e4b021c18: 0000000000000003 00181818182f98a0
ffff883e4b021c28: ffff883e4dac4bc0 ffff883e4b011218
ffff883e4b021c38: 0000000000000029 0000000000000000
ffff883e4b021c48: 0000000000000008 0000000000000003
ffff883e4b021c58: 000000000000408e 0000000000000000
ffff883e4b021c68: ffffffff81e56ce0 ffffffffffffffff
ffff883e4b021c78: ffffffff81133662 0000000000000010
ffff883e4b021c88: 0000000000010216 ffff883e4b021ca8
ffff883e4b021c98: 0000000000000000 ffffffff81133654
ffff883e4b021ca8: ffff883e4b021cc4 30181818182f989a
ffff883e4b021cb8: 0000000000000000 00007f1ac86072fc
ffff883e4b021cc8: ffff883f89f0c038 ffff883fbe860d78
ffff883e4b021cd8: 00000000000200da ffffffff81132bd6
#6 [ffff883e4b021ce0] swapin_readahead at ffffffff81132bd6
ffff883e4b021ce8: 0000000000000000 30181818182f989a
ffff883e4b021cf8: 0000000000000000 0000000000000000
ffff883e4b021d08: 0000000000000000 ffffffff81257735
ffff883e4b021d18: 0000000000000000 ffffffff8146508e
ffff883e4b021d28: ffff88407ddb3a20 ffff881fcf625800
ffff883e4b021d38: ffffffff81103809 30181818182f989a
ffff883e4b021d48: 0000000000000000 0000000000000000
ffff883e4b021d58: ffff883f89f0c038 0000000000000029
ffff883e4b021d68: ffff883e4dac4bc0 ffffffff81122a8d
#7 [ffff883e4b021d70] do_swap_page at ffffffff81122a8d
ffff883e4b021d78: ffff883e4dac4bc0 ffff883e4b011218
ffff883e4b021d88: ffff883e4b011218 00007f1ac86072fc
ffff883e4b021d98: ffff883fbe860d78 ffff883f89f0c038
ffff883e4b021da8: ffffea00de62cab0 ffff883fbe860d78
ffff883e4b021db8: ffffea00de62cab0 303030305f313430
ffff883e4b021dc8: 0000000000000000 ffff883fbe860d78
ffff883e4b021dd8: ffff883f89f0c038 0000000000000029
ffff883e4b021de8: 00007f1ac86072fc ffffffff81123ab1
#8 [ffff883e4b021df0] handle_pte_fault at ffffffff81123ab1
ffff883e4b021df8: 303030305f313430 ffffffff81123b52 --303030305f313430 orig_pte should be
ffff883e4b021e08: 000000014b011218 ffff880000000358
ffff883e4b021e18: 00000029de62caa0 ffff883fbe860d78
ffff883e4b021e28: 00007f1ac86072fc 0000000000000006
ffff883e4b021e38: ffff883e4b021f58 0000000000000029
ffff883e4b021e48: ffff883e4dac4bc0 ffffffff8146873d
#9 [ffff883e4b021e50] do_page_fault at ffffffff8146873d
ffff883e4b021e58: ffff883e4dac4c20 ffff883e4b01e540
ffff883e4b021e68: ffff883e4b021fd8 ffff883e4b021fd8
ffff883e4b021e78: 0000000000010900 ffff883e4b01e540
ffff883e4b021e88: ffff883e4dd18480 ffff883e4b01e540
ffff883e4b021e98: ffffffff81055e30 dead000000100100
ffff883e4b021ea8: dead000000200200 ffffffff8146da6e
ffff883e4b021eb8: ffff883e4b021f70 ffffffff8146508e
ffff883e4b021ec8: 00000000000006fe ffffffff8146da6e
ffff883e4b021ed8: ffff883e4dac4bc0 ffff883e4b011218
ffff883e4b021ee8: 0000000000000029 0000000000000001
ffff883e4b021ef8: 0000000000000000 0000000400000063
ffff883e4b021f08: 0000000000000001 00007f1ac86072fc
we have a lots of free  memory,and i set the nr_swapfiles be zero when the machine start,although i know that nr_swapfiles be  is not mean we close the swap ,but i still be refused why the machine should be swap now ?
and why i get NULL pointer? i didn't set the swap partition enable。

suse 奇怪的crash 问题的更多相关文章

  1. 利用Android Studio、MAT对Android进行内存泄漏检测

    利用Android Studio.MAT对Android进行内存泄漏检测 Android开发中难免会遇到各种内存泄漏,如果不及时发现处理,会导致出现内存越用越大,可能会因为内存泄漏导致出现各种奇怪的c ...

  2. sqlite在Android上的一个bug:SQLiteCantOpenDatabaseException when nativeExecuteForCursorWindow

    更多内容在这里查看 https://ahangchen.gitbooks.io/windy-afternoon/content/ ::-/com.company.product W/System.er ...

  3. __stack_chk_fail栈检查失败

    1. __stack_chk_fail的作用 在了函数的局部变量和保存的指令指针(译注:此处指返回地址和EBP)之间.这个值被称作金丝雀(“canary”)值 参考 http://www.freebu ...

  4. 手机cpu结构,arm

    问题描述 今天测试人员测试集成版本时除了一个bug:关于华为 Mate 8手机Android 6.0系统运行刚刚提测的版本时,出现闪退的bug,而小米 4 手机Android 6.0系统却没有出现任何 ...

  5. Android 设备的CPU类型(通常称为”ABIs”)

    armeabiv-v7a: 第7代及以上的 ARM 处理器.2011年15月以后的生产的大部分Android设备都使用它. arm64-v8a: 第8代.64位ARM处理器,很少设备,三星 Galax ...

  6. Android 关于arm64-v8a、armeabi-v7a、armeabi、x86下的so文件兼容问题

    Android 设备的CPU类型(通常称为”ABIs”) 引用: https://blog.csdn.net/ouyang_peng/article/details/51168072 armeabiv ...

  7. 【转】Android 关于arm64-v8a、armeabi-v7a、armeabi、x86下的so文件兼容问题

    转载地址:http://blog.csdn.net/ouyang_peng/article/details/51168072 Android 设备的CPU类型(通常称为”ABIs”) x86: 平板. ...

  8. 我的Android进阶之旅------&gt;Android 关于arm64-v8a、armeabi-v7a、armeabi、x86下的so文件兼容问题

    Android 设备的CPU类型通常称为ABIs 问题描写叙述 解决方法 1解决之前的截图 2解决后的截图 3解决方法 4建议 为什么你须要重点关注so文件 App中可能出错的地方 其它地方也可能出错 ...

  9. linux 3.10的list_del

    最近看到一个page的数据比较奇怪: crash> page ffffea002c239c58 struct page { flags = , _count = { counter = 34-- ...

随机推荐

  1. [UE4]反射

    1.根据名字获得类(C++支持,蓝图本身不支持但可以通过工厂模式模拟) 国外大神提供的封装好的C++实现: https://github.com/getsetgames/BlueprintReflec ...

  2. SQL-sqlHelper001

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  3. 知识点:Navicet Mysql数据库电脑本地备份

    Navicet Mysql数据库电脑本地备份 1.打开navicat客户端,连上mysql后,双击左边你想要备份的数据库.点击“计划”,再点击“新建批处理作业”.     2.双击上面的可用任务,它就 ...

  4. c#day01

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace test ...

  5. tf.nn.embedding_lookup

    tf.nn.embedding_lookup(params, ids, partition_strategy=’mod’, name=None, validate_indices=True, max_ ...

  6. python中编码问题

    各种编码在内存中所占的大小: ascii: 英文:8bit (1B) uft-: 英文:8bit (1B) 中文:24bit (3B) GBK: 英文:8bit (1B) 中文:16bit (2B) ...

  7. CRM 报表中 Filtered 无数据

    数据源设置为以下才可以使用  Filtered+实体名称和  fn_FindBusinessGuid   和 fn_FindUserGuid 

  8. Unity中进程间通信——使用Protobuf-net序列化与反序列化

    基于ProtoBuf协议实现网络传输(上) Protobuf 全称Protocol Buffers 是一种轻便高效的结构化数据存储格式,可以用于结构化数据串行化,很适合做数据存储或 RPC 数据交换格 ...

  9. NameNode配置HA后及其反过程Hive路径不正确的问题解决

    在CDH5.7下,配置了NameNode的HA后,Hive无正常查询数据了,但是其他的组件HDFS , HBase ,Spark都正常的.Hive新建表出现如下异常: CREATE TABLE `x_ ...

  10. pyhton框架Django之cookie和session

    一,cookie和session的理解 cookies 是浏览器为 Web 服务器存储的一小段信息. 每次浏览器从某个服务器请求页面时,它向服务器回送之前收到的cookies.它保存在浏览器下的某个文 ...