Controller redirect after logging in causes Segmentation fault

my user login code looks something like this
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->redirect(["/myModule/admin"]);
}
this code causes apache to throw segmentation fault error.
i see something like this in apache error log
[core:notice] [pid XXXX] AH00052: child pid XXXX exit signal Segmentation fault (11)

please note that

  1. the same redirect code works once the user is already logged in
    i.e. this code works fine here
    if (!Yii::$app->user->isGuest) {
    return $this->redirect(["/myModule/admin"]);
    }
  2. that error kills the session that was just created.

I am currently using this code to make it work somehow.
if ($model->load(Yii::$app->request->post()) && $model->login()) {
die(“Login successful. Click here to conitnue if you don’t see your admin dashboard in 5 seconds.");
}

I am using Yii 2.0.28-dev, PHP 7.3.10, Apache 2.4.41 and MacOS Catalina