It's unclear how many voters have been affected.
Mahathir has a reputation as an authoritarian, but is still a huge figure in the country.
Malaysia was ranked 125 out of 197 countries worldwide in the 2018 World Electoral Freedom Index, which the right's commission says reflects the flawed democratic process in the country. Final results are expected late Wednesday or early Thursday.
The Malaysian Communications and Multimedia Commission said in a statement that an initial investigation into the spam calls pointed to anonymous bot (automated program) attacks from various sources and on various targets irrespective of political parties.
Ibrahim says the decision to hold the election midweek is probably the main factor in turnout falling from 2013 as some people wouldn't have been able to make it hometowns to vote, particularly among the half million Malaysians who work in neighboring Singapore.
Polling stations for the 14.9 million registered Malaysian voters open at 0000 GMT and close at 0900 GMT.
Election officials say turnout has hit 55 percent by 1 p.m.in Malaysia's general election.
More than anyone, Mr. Mahathir created the strong government that Mr. Najib has used to stay in power.
He said the commission will investigate complaints that ballot papers didn't reach some postal voters in time and that some were invalid because they weren't stamped as official.
As well as seizing control of the national government, several state legislatures across the country fell into opposition hands for the first time, including the highly symbolic bastion of Johor, the birthplace of Najib's party that was the lynchpin of the ruling coalition.More news: Congress trying to rig Karnataka Assembly elections: BJP chief Amit Shah
More news: China, Japan to launch communication mechanism to address maritime, airspace differences: FM
More news: After transfer from Ohio State, Joe Burrow will have plenty of options
The result is a political natural disaster for Muslim-majority Malaysia, sweeping aside the government of Prime Minister Najib Razak, whose reputation was tarnished by a monumental corruption scandal and the imposition of an unpopular sales tax that hurt many of his coalition's poor rural supporters.
A crowd of cameramen and photographers jostled for space as a smiling Mahathir, 92, entered the polling booth and waited for his turn to vote. "Without releasing the results, I can't go to see the King", Dr Mahathir said. "People are for people".
They believe his connection to rural Muslim voters can trigger what they have dubbed a "Malay tsunami" and unseat Prime Minister Najib Razak's coalition after six decades in power.
Najib showed reporters a finger stained in purple ink after voting and then greeted supporters.
Kuala Lampur: Malaysians voted on Wednesday in a cliffhanger election pitting Prime Minister Najib Razak's coalition against a resurgent opposition led by 92-year-old former leader Mahathir Mohamad, but the government is expected to clinch a narrow win.
U.S. investigators say $4.5 billion was stolen from 1MDB, the investment fund, by associates of Najib between 2009 and 2014, including $700 million that landed in Najib's bank account.
"But the most important thing is for the people to decide on the destiny of this nation, and it must be based on facts, it must be based on policy, it must be based on who can execute the best plan for the nation and for the people". "I guess no matter who wins, this can only be good for Malaysia and for that I am happy", she said.
In an election eve appeal to voters, Najib promised income tax exemptions for young people and public holidays if his coalition wins.
The ruling National Front coalition has been in power for 60 years but has lost support in the past two elections.