Re: kmem -[sS] segfault on 2.6.25.17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Mike,

Apply this patch to 4.0-7.4 and run it on your live system.

It works with the sample vmcore you sent me, and it should also alleviate
many of the errors that I suggested might be due to the underlying
shifting sands of your live system.

I don't know why this is the first report of this, nor why I've never
seen this before?  The problem has to do with using invalid entries
in the kmem_cache.nodelists[MAXNUMNODES] array of kmem_list3 data
structures.  To date, the unused entries have typically been NULL
for non-existent memory nodes, but not so with your kernel.

Let me know how it works for you.

Thanks,
  Dave

--- memory.c.orig	2008-10-17 15:50:55.000000000 -0400
+++ memory.c	2008-10-17 15:50:46.000000000 -0400
@@ -7542,12 +7542,16 @@
 		for (i = 0; i < vt->kmem_cache_len_nodes && start_address[i]; i++) {
 			if (readmem(start_address[i] + OFFSET(kmem_list3_shared), 
 			    KVADDR, &shared, sizeof(void *),
-			    "kmem_list3 shared", RETURN_ON_ERROR|QUIET) &&
-			    readmem(shared + OFFSET(array_cache_limit),
+			    "kmem_list3 shared", RETURN_ON_ERROR|QUIET)) {
+				if (!shared)
+					break;
+			} 
+			if (readmem(shared + OFFSET(array_cache_limit),
 	       		    KVADDR, &limit, sizeof(int), "shared array_cache limit",
 		            RETURN_ON_ERROR|QUIET)) {
 				if (limit > max_limit)
 					max_limit = limit;
+				break;
 			}
 		}
 	}
@@ -8977,6 +8981,9 @@
 		slab_buf = GETBUF(SIZE(slab));
 		for (index=0; (index < vt->kmem_cache_len_nodes) && start_address[index]; index++)
 		{ 
+			if ((vt->flags & NODES_ONLINE) && (next_online_node(index) != index))
+				break;
+
 			slab_chains[0] = start_address[index] + OFFSET(kmem_list3_slabs_partial);
 			slab_chains[1] = start_address[index] + OFFSET(kmem_list3_slabs_full);
 		        slab_chains[2] = start_address[index] + OFFSET(kmem_list3_slabs_free);
@@ -9078,6 +9085,9 @@
 		slab_buf = GETBUF(SIZE(slab));
 		for (index=0; (index < vt->kmem_cache_len_nodes) && start_address[index]; index++)
 		{ 
+			if ((vt->flags & NODES_ONLINE) && (next_online_node(index) != index))
+				break;
+
 			slab_chains[0] = start_address[index] + OFFSET(kmem_list3_slabs_partial);
 			slab_chains[1] = start_address[index] + OFFSET(kmem_list3_slabs_full);
 		        slab_chains[2] = start_address[index] + OFFSET(kmem_list3_slabs_free);
@@ -10159,7 +10169,7 @@
 	    sizeof(ulong) * vt->kmem_cache_len_nodes , "array nodelist array", 
 	    RETURN_ON_ERROR) ||  
 	    !readmem(start_address[index] + OFFSET(kmem_list3_shared), KVADDR, &shared,
-	     sizeof(void *), "kmem_list3 shared", RETURN_ON_ERROR|QUIET) ||
+	     sizeof(void *), "kmem_list3 shared", RETURN_ON_ERROR|QUIET) || !shared ||
 	    !readmem(shared + OFFSET(array_cache_avail), KVADDR, &avail, sizeof(int), 
 	    "shared array_cache avail", RETURN_ON_ERROR|QUIET) || !avail) {
 		FREEBUF(start_address);
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux