On Sun, 23 Feb 2003, MAASK Group wrote: > Hi, > I am getting a general protection fault with an error code 0 in a thread > (lightweight process) created using pthread_create().... I checked out that > this is an exception when a double fault occurs... What is a double fault? I assume you use an x86 processor. A double fault is simply as it says, a second fault occuring after a first one, such as a GPF after a page fault, etc. See for more info the Intel docs on the subject (http://developer.intel.com/design/pentiumii/manuals/24319202.pdf). > Also this happens after a page fault... but several page faults are > successful before this... so the reason might not be a page fault. The page fault is most likely the first part of the reason. > Does anyone know what all are the conditions on which the general > protection fault occurs? It is generated in hardware.. so i couldnt really > find out. The GPF itself is a collection of all reasons that don't happen too often to make it a separate exception, but still important enough to report. See the abovementioned intel docs about the subject. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/