Problem with redirecting.
Dormando <[email protected]>
| Newsgroups | gmane.network.tux |
|---|---|
| Message-ID | <[email protected]> |
Hi, I wrote a TUX module to handle reading from a special image cache on disk, and it redirects to apache if it cannot find the image or if there's another error along the way. Apache will fetch the image and put it into the cache if it doesn't exist already. Except, no matter where in the code I redirect to apache, it will completely hang the TUX thread, so after a few tries I've completely hung TUX, and have to reboot the machine to make it usable again. If it can successfully draw from the disk cache, it will work no matter how many times I run it. Whenever it runs TUX_ACTION_REDIRECT_REQ, it will successfully redirect the request and return the image from apache. After it finishes sending the image from apache, the TUX thread hardlocks. It does not return to the module again. I have upgraded TUX to the latest release in both kernel and userspace code (2.4.18-A3, 2.2.5 userspace) and the problem still exists. URL to the code: http://rydia.net/~dormando/userpic.c Some debugging output from it working correctly once, then me crashing both running threads: Heading into request #0. Objectname userpic/10 Running event 0 Looking for rindex See if this is the end of the string. Getting the length of the string, and sanity checking. Scanning the array for digits. Building objectnew Copying array and grabbing object. Heading into request #1. Objectname /userpics/010/p10 Mallocing Heading into request #2. Objectname /userpics/010/p10 Running event 3 Running the MIME checks Sending the header buffer Heading into request #3. Objectname /userpics/010/p10 Sending the actual object now, wohoo Heading into request #4. Objectname /userpics/010/p10 Closing the request Heading into request #0. Objectname userpic/1000000000000000000000 Running event 0 Looking for rindex See if this is the end of the string. Getting the length of the string, and sanity checking. Heading into request #0. Objectname userpic/1000000000000000000000 Running event 0 Looking for rindex See if this is the end of the string. Getting the length of the string, and sanity checking. Any help is appreciated. The code isn't long. -Alan