i am using 4.8 version. xserver hangs after some time and i can't switch to the console once it happens.

Recognize that few developers frequent these forums. Most of the readership here are enthusiasts, both amateur & professional. As such, we may only have a passing knowledge of the code base.

The information you have provided is insufficient. Is this an Apple Xserve? If so, Apple has been found notorious for non-standard hardward configurations.

In general, supplying the output of dmesg(1) is considered to be a minimally required.

By searching the project's bug database, this appears to nominally related to PR#6392. Because what you describe is not exactly the same, I would recommend you submitting a PR yourself. Information on what is considered important when reporting a bug can be found at the following:

I tried the snapshot version.The error seems to be still there, when i try to start kde it works for some time and freezes and i am not able to switch to console. Error seems to be the same as before in the dmesg
inteldrm0: gpu hung!

Then consider filing a PR report. The developers will be more interested in the results involving -current, but I would recommend providing all information gathered to date. See the link provided earlier & be thorough in your report.

I've had the same problem with my P4 2.8ghz computer... Xserver crashes(sometimes its a startup crash or after some minor usage) though I've been able to switch back to console on another tty and kill it; though it still won't come back after it has been kill ..(well not working properly at least..)